| | size=2>When an exception occurs and is not immediately caught, it propagates up the call stack until it either is caught by one of the invoking methods, or remains uncaught. For methods called from the size=2>main() method, the exception can potentially float all the way back up to size=2>main() and get reported there. However, when a new thread is spawned, a brand new call stack is created. This call stack starts with the color=#010100 face="Courier New" size=2>run() color=#010100 face=Arial size=2> method. The color=#010100 face="Courier New" size=2>run() color=#010100 face=Arial size=2> method does not declare that it throws any exceptions and should therefore catch all of them. | |
|
No comments:
Post a Comment