Original question
Given the following method, which is part of the library (therefore, it cannot be edited) (also, it A()is closed, therefore, it cannot be called outside m()):
void m() {
try {
A();
} catch (Exception e) {
B();
throw e;
}
}
When called m(), it is A()generated Exception eand therefore executed B(). However, it B()also throws an exception, which is then thrown (instead of ewhich will be thrown later).
Is it possible to find Exception e? Perhaps using some kind of smart reflex or a multi-threaded approach to pause and move?
An explanation of why I chose the best answer, and what else could be useful
Makoto's answer:
e is lost because any exception thrown will cause a sudden termination of execution.
- (.. Exception e).
, :
, - catch.
Pinkie Swirl:
, e ( ..)
: (, , SQLException, , ).