It'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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…