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

Exception(message, cause) - Java Exception's constructor

Constructor
java.lang.Exception
Exception(
  String message,
  Throwable cause
)

Constructs a new exception with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

Parameters:
message - the detail message (which is saved for later retrieval by the getMessage() method).
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