Title: Use the methods of Throwable.
Course: Java Programming (Oracle) (10055) > Section: Handling Exceptions

Usage of the methods of Throwable requires that the class be extended and that a subclass of Throwable will have access to the methods of its superclass. Throwable has four constructors:

- Throwable()
- Throwable(String message)
- Throwable(String message, Throwable cause)
- Throwable(Throwable cause)

Also, as a superclass, Throwable has several methods which are available to all classes which inherit from it:

- getMessage()—Returns a message associated with the exception/error
- toString()—Returns a String containing a description of the Throwable object

printStackTrace()—Prints the string return by toString() followed by the execution stack trace showing the sequence of a method invocations that led to the exception being thrown