|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
public class RuntimeException
This is the base-class of all unchecked exceptions. Unchecked exceptions do not need to be declared in the method signatur and the compiler does not enforce that a handler is defined for them.
RuntimeExceptions normally occur as a bug in a program and they are often not recoverable by the user.
Constructor Summary | |
---|---|
RuntimeException()
Constructor for a RuntimeException with no detail message. |
|
RuntimeException(String s)
Constructor for a RuntimeException with given detail message. |
|
RuntimeException(String s,
Throwable ex)
Constructor for a RuntimeException with given detail message and cause. |
|
RuntimeException(Throwable ex)
Constructor for a RuntimeException with given cause and detail message set to ex.toString(). |
Method Summary |
---|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RuntimeException()
public RuntimeException(String s)
ensures
(s != null IMPLIES getMessage().equals(s));
s
- the detail message.public RuntimeException(Throwable ex)
ensures
(ex != null IMPLIES getCause() == ex && getMessage().equals(ex.toString()));
ex
- the cause why this exception was created or null if
none.public RuntimeException(String s, Throwable ex)
ensures
(s != null IMPLIES getMessage().equals(s), ex != null IMPLIES getCause() == ex);
s
- the detail message.ex
- the cause why this exception was created or null if
none.
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |