Name
java.lang.Throwable
Synopsis
This class is a scaled-down version of the J2SE
Throwable
class. It is the superclass of all
errors and exceptions in the Java language, and only objects that
extend this class can be thrown or caught in the Java virtual
machine. The getMessage()
method returns any error
messages that are set in the constructor.
printStackTrace()
creates a stack trace that shows
precisely where a specific error occurred in an application.
public classThrowable
{ // constructors publicThrowable
(); publicThrowable
(String message); // public instance methods public StringgetMessage
(); public voidprintStackTrace
(); public StringtoString
(); }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.