Paritosh Piplewar Paritosh Piplewar - 1 year ago 150
Java Question

what is exception propagation?

what is exception propagation ?

I tried in google but not satisfied with result . Please also explain with some example if possible . C++ , php and java language preferable .

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download