Home » JPA » java.lang.Throwable » Throwable(cause) - Java Throwable's constructor

Throwable(cause) - Java Throwable's constructor

  Throwable cause

Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for throwables that are little more than wrappers for other throwables (for example, java.security.PrivilegedActionException).

The fillInStackTrace() method is called to initialize the stack trace data in the newly created throwable.

cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Java 1.4