public class RuntimeException extends Exception
RuntimeException
can be thrown at any time during the execution of a Java virtual machine.
Methods which throw these exceptions are not required to declare them
in their throws clause.Constructor and Description |
---|
RuntimeException()
Create an exception without a message.
|
RuntimeException(String s)
Create an exception with a message.
|
RuntimeException(String s,
Throwable cause)
Create an exception with a message and a cause.
|
RuntimeException(Throwable cause)
Create an exception with the given cause, and a message of
cause == null ? |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RuntimeException()
Throwable.initCause(Throwable)
public RuntimeException(String s)
s
- the message stringThrowable.initCause(Throwable)
public RuntimeException(String s, Throwable cause)
s
- the message stringcause
- the cause of this exceptionpublic RuntimeException(Throwable cause)
cause == null ? null : cause.toString()
.cause
- the cause of this exception