public class InvalidDataTypeException extends Exception
Constructor and Description |
---|
InvalidDataTypeException()
Constructs a new throwable with
null as its detail message. |
InvalidDataTypeException(String message)
Constructs a new throwable with the specified detail message.
|
InvalidDataTypeException(String message,
Throwable cause)
Constructs a new throwable with the specified detail message and
cause.
|
InvalidDataTypeException(String message,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace)
Constructs a new throwable with the specified detail message,
cause, suppression enabled or
disabled, and writable stack trace enabled or disabled.
|
InvalidDataTypeException(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 ). |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InvalidDataTypeException()
null
as its detail message.
The cause is not initialized, and may subsequently be initialized by a
call to Throwable.initCause(java.lang.Throwable)
.
The Throwable.fillInStackTrace()
method is called to initialize
the stack trace data in the newly created throwable.
public InvalidDataTypeException(String message)
Throwable.initCause(java.lang.Throwable)
.
The Throwable.fillInStackTrace()
method is called to initialize
the stack trace data in the newly created throwable.
message
- the detail message. The detail message is saved for
later retrieval by the Throwable.getMessage()
method.public InvalidDataTypeException(String message, Throwable cause)
Note that the detail message associated with
cause
is not automatically incorporated in
this throwable's detail message.
The Throwable.fillInStackTrace()
method is called to initialize
the stack trace data in the newly created throwable.
message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null
value is
permitted, and indicates that the cause is nonexistent or
unknown.)public InvalidDataTypeException(Throwable cause)
(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, PrivilegedActionException
).
The Throwable.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
Throwable.getCause()
method). (A null
value is
permitted, and indicates that the cause is nonexistent or
unknown.)public InvalidDataTypeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
Throwable.getSuppressed()
for this object
will return a zero-length array and calls to Throwable.addSuppressed(java.lang.Throwable)
that would otherwise append an exception to the
suppressed list will have no effect. If the writable stack
trace is false, this constructor will not call Throwable.fillInStackTrace()
, a null
will be written to the
stackTrace
field, and subsequent calls to fillInStackTrace
and Throwable.setStackTrace(StackTraceElement[])
will not set the stack
trace. If the writable stack trace is false, Throwable.getStackTrace()
will return a zero length array.
Note that the other constructors of Throwable
treat
suppression as being enabled and the stack trace as being
writable. Subclasses of Throwable
should document any
conditions under which suppression is disabled and document
conditions under which the stack trace is not writable.
Disabling of suppression should only occur in exceptional
circumstances where special requirements exist, such as a
virtual machine reusing exception objects under low-memory
situations. Circumstances where a given exception object is
repeatedly caught and rethrown, such as to implement control
flow between two sub-systems, is another situation where
immutable throwable objects would be appropriate.
message
- the detail message.cause
- the cause. (A null
value is permitted,
and indicates that the cause is nonexistent or unknown.)enableSuppression
- whether or not suppression is enabled or disabledwritableStackTrace
- whether or not the stack trace should be
writableOutOfMemoryError
,
NullPointerException
,
ArithmeticException
Copyright © 2016–2018. All rights reserved.