public class BasicRuntimeException extends RuntimeException
Constructor and Description |
---|
BasicRuntimeException(String message,
Object... args)
Constructor.
|
BasicRuntimeException(Throwable cause,
String message,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T extends Throwable> |
getCause(Class<T> c)
Same as
Throwable.getCause() but searches the throwable chain for an exception of the specified type. |
protected static String |
getMessage(Throwable cause,
String msg,
String def)
Finds the message.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public BasicRuntimeException(String message, Object... args)
message
- The MessageFormat
-style message.args
- Optional MessageFormat
-style arguments.public BasicRuntimeException(Throwable cause, String message, Object... args)
cause
- The cause of this exception.message
- The MessageFormat
-style message.args
- Optional MessageFormat
-style arguments.protected static final String getMessage(Throwable cause, String msg, String def)
cause
- The cause.msg
- The message.def
- The default value if both above are public <T extends Throwable> T getCause(Class<T> c)
Throwable.getCause()
but searches the throwable chain for an exception of the specified type.T
- The throwable type to search for.c
- The throwable type to search for.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.