February 2014
Beginner
1248 pages
62h 25m
English
• When an exception is thrown but not caught in a particular scope, the method-call stack is un wound, and an attempt is made to catch the exception in the next outer try statement.
• Class Throwable offers a printStackTrace method that prints the method-call stack. Often, this is helpful in testing and debugging.
• Class Throwable also provides a getStackTrace method that obtains the same stack-trace information that’s printed by printStackTrace (p. 461).
• Class Throwable’s getMessage method (p. 461) returns the descriptive string stored in an exception.
• Method getStackTrace (p. 461) obtains the stack-trace information as an array of StackTrace Element objects. ...
Read now
Unlock full access