On Monkhouse's book, p 156. It says:
There are many solutions to prevent deadlocks, among them: ....
Ignore the problem. Seriously- is it a requirement of your assignment? Is there a possibility that attempting to handle this problem could result in you making a mistake....
If there is a deadlock when the program is execute, I don't think I can use exception handling to handle this problem.
When deadlock happens, the program hangs forever. If that is the case, I can only improve the code, but I cannot use try catch block to throw exceptions and let the rest of the program execute.