What is exception propagation? I tried to Google it, but couldn't find satisfactory results. Preferably explain this in terms of Java.
See Question&Answers more detail:osWhat is exception propagation? I tried to Google it, but couldn't find satisfactory results. Preferably explain this in terms of Java.
See Question&Answers more detail:osIt's explained, surprisingly, in the Java tutorial page about exceptions.
An exception propagates from method to method, up the call stack, until it's caught. So if a()
calls b()
, which calls c()
, which calls d()
, and if d()
throws an exception, the exception will propagate from d to c to b to a, unless one of these methods catches the exception.