Package org.apache.juneau
Class BasicRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BasicHttpException,- BeanRuntimeException,- ClassMetaRuntimeException,- ConfigException,- ContextRuntimeException,- ExecutableException,- InvalidAnnotationException,- InvalidDataConversionException,- ObjectRestException,- ParseException,- PatternException,- RemoteMetadataException,- SerializeException,- VarResolverException
Subclass of runtime exceptions that take in a message and zero or more arguments.
 
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBasicRuntimeException(String message, Object... args) Constructor.BasicRuntimeException(Throwable cause) Constructor.BasicRuntimeException(Throwable cause, String message, Object... args) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionprotected final voidThrows anUnsupportedOperationExceptionif the unmodifiable flag is set on this bean.<T extends Throwable>
 TSame asThrowable.getCause()but searches the throwable chain for an exception of the specified type.booleanReturnstrue if this bean is unmodifiable.setMessage(String message, Object... args) Sets the detail message on this exception.voidsetStackTrace(StackTraceElement[] stackTrace) protected BasicRuntimeExceptionSpecifies whether this bean should be unmodifiable.unwrap()Returns the caused-by exception if there is one.Methods inherited from class java.lang.ThrowableaddSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, toString
- 
Constructor Details- 
BasicRuntimeExceptionConstructor.- Parameters:
- cause- The cause of this exception.
- message- The- MessageFormat-style message.
- args- Optional- MessageFormat-style arguments.
 
- 
BasicRuntimeExceptionConstructor.- Parameters:
- message- The- MessageFormat-style message.
- args- Optional- MessageFormat-style arguments.
 
- 
BasicRuntimeExceptionConstructor.- Parameters:
- cause- The cause of this exception.
 
 
- 
- 
Method Details- 
setUnmodifiableSpecifies whether this bean should be unmodifiable.When enabled, attempting to set any properties on this bean will cause an UnsupportedOperationException.- Returns:
- This object.
 
- 
isUnmodifiableReturnstrue if this bean is unmodifiable.- Returns:
- true if this bean is unmodifiable.
 
- 
assertModifiableThrows anUnsupportedOperationExceptionif the unmodifiable flag is set on this bean.
- 
getCauseSame asThrowable.getCause()but searches the throwable chain for an exception of the specified type.- Type Parameters:
- T- The throwable type to search for.
- Parameters:
- c- The throwable type to search for.
- Returns:
- The exception, or null if not found.
 
- 
setMessageSets the detail message on this exception.- Parameters:
- message- The message.
- args- The message args.
- Returns:
- This object.
 
- 
getMessage- Overrides:
- getMessagein class- Throwable
 
- 
fillInStackTrace- Overrides:
- fillInStackTracein class- Throwable
 
- 
initCause
- 
setStackTrace- Overrides:
- setStackTracein class- Throwable
 
- 
unwrapReturns the caused-by exception if there is one.- Returns:
- The caused-by exception if there is one, or this exception if there isn't.
 
 
-