src/share/classes/java/lang/Throwable.java

Print this page
rev 5703 : [mq]: throwableevent

*** 25,34 **** --- 25,36 ---- package java.lang; import java.io.*; import java.util.*; + import sun.misc.ThrowableTrace; + /** * The {@code Throwable} class is the superclass of all errors and * exceptions in the Java language. Only objects that are instances of this * class (or one of its subclasses) are thrown by the Java Virtual Machine or * can be thrown by the Java {@code throw} statement. Similarly, only
*** 246,255 **** --- 248,258 ---- * <p>The {@link #fillInStackTrace()} method is called to initialize * the stack trace data in the newly created throwable. */ public Throwable() { fillInStackTrace(); + ThrowableTrace.traceThrowable(this); } /** * Constructs a new throwable with the specified detail message. The * cause is not initialized, and may subsequently be initialized by
*** 262,271 **** --- 265,275 ---- * later retrieval by the {@link #getMessage()} method. */ public Throwable(String message) { fillInStackTrace(); detailMessage = message; + ThrowableTrace.traceThrowable(this); } /** * Constructs a new throwable with the specified detail message and * cause. <p>Note that the detail message associated with
*** 285,294 **** --- 289,299 ---- */ public Throwable(String message, Throwable cause) { fillInStackTrace(); detailMessage = message; this.cause = cause; + ThrowableTrace.traceThrowable(this); } /** * Constructs a new throwable with the specified cause and a detail * message of {@code (cause==null ? null : cause.toString())} (which
*** 308,317 **** --- 313,323 ---- */ public Throwable(Throwable cause) { fillInStackTrace(); detailMessage = (cause==null ? null : cause.toString()); this.cause = cause; + ThrowableTrace.traceThrowable(this); } /** * Constructs a new throwable with the specified detail message, * cause, {@linkplain #addSuppressed suppression} enabled or
*** 363,372 **** --- 369,379 ---- } detailMessage = message; this.cause = cause; if (!enableSuppression) suppressedExceptions = null; + ThrowableTrace.traceThrowable(this); } /** * Returns the detail message string of this throwable. *