Click to See Complete Forum and Search --> : Propagate exception to outer try/catch


triassic
08-07-2009, 10:36 AM
In this example, is there any way to get the exception to propagate to the outer try/catch? I can not modify functionB.


public void functionA() {
try {
functionB();
} catch (Exception e) {

}
}

public void functionB() {
try {
doSomething...
} catch (Exception e) {

}
}

JavaServlet
08-08-2009, 11:04 PM
You can create muliple catch clauses and the exception will percolate to any outer try block that may handle it.