If there is a breakpoint within a function that's evaluated as part of a when, that breakpoint will suspend execution before any stack unwinding occurs By contrast, a breakpoint at a catch will only suspend execution after all finally handlers have run. I want to know if i can safely write catch () only to catch all system.exception types Or do i've to stick to catch (exception) to accomplish this I know for other exception types (e.g. 22 if there is a hierarchy of exceptions you can use the base class to catch all subclasses of exceptions
In the degenerate case you can catch all java exceptions with: Finally and catch blocks are quite different Within the catch block you can respond to the thrown exception This block is executed only if there is an unhandled exception and the type matches the one or is subclass of the one specified in the catch block's parameter Finally will be always executed after try and catch blocks whether there is an exception raised or not. Please forgive my inability to paste the actual code, but what he did was something
Nope, (or ) is 's friend and always there as part of try/catch However, it is perfectly valid to have them empty, like in your example In the comments in your example code (if func1 throws error, try func2), it would seem that what you really want to do is call the next function inside of the block of the previous. I vaguely remember reading elsewhere (though i couldn't find it again) of problems with this In such cases where exception filtering didn't work correctly, they would catch the closest type they could and then use a switch. I think that this only works if you raise and then catch the exception, but not if you try getting the traceback before raising an exception object that you create, which you might want to do in some designs.
OPEN