java.lang · java.base · since Java 1.0
Throwable
public class Throwable implements SerializableThe root of everything throwable: message, cause chain, stack trace, and suppressed exceptions. Error and Exception split beneath it.
Key methods
String getMessage() | The detail message — include failure-capture data (EJ 75). |
Throwable getCause() | The chained cause set at construction or via initCause. |
StackTraceElement[] getStackTrace() | Captured at construction — the expensive part. |
Throwable[] getSuppressed() | Exceptions attached by try-with-resources close failures. |
void printStackTrace() | For scratch code; production uses a logger. |