姜青林 发表于 2013-8-16 16:08:34

[Oracle interview]How does an exception permeate through the code?

胡一搏 发表于 2013-8-16 16:14:14

Anunhandled exception moves up the method stack in search of a matching When anexception is thrown from a code which is wrapped in a try block followed byone or more catch blocks, a search is made for matching catch block. If amatching type is found then that block will be invoked. If a matching type isnot found then the exception moves up the method stack and reaches the callermethod. Same procedure is repeated if the caller method is included in a trycatch block. This process continues until a catch block handling theappropriate type of exception is found. If it does not find such a block thenfinally the program terminates.
页: [1]
查看完整版本: [Oracle interview]How does an exception permeate through the code?