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

Exception(cause) - Java Exception's constructor

Constructor
java.lang.Exception
Exception(
  Throwable cause
)

Constructs a new exception 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 exceptions that are little more than wrappers for other throwables (for example, java.security.PrivilegedActionException).
Parameters:
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.)
Since:
Java 1.4