Class ExecutableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.commons.reflect.ExecutableException
- All Implemented Interfaces:
Serializable
General exception that occurs when trying to execute a constructor, method, or field using reflection.
-
Constructor Summary
ConstructorsConstructorDescriptionExecutableException(String message, Object... args) Constructor.ExecutableException(Throwable causedBy) Constructor.ExecutableException(Throwable causedBy, String message, Object... args) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionIf the thrown exception was anInvocationTargetExceptionreturns the target exception.unwrap()Returns the caused-by exception if there is one.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExecutableException
Constructor.- Parameters:
message- TheMessageFormat-style message.args- OptionalMessageFormat-style arguments.
-
ExecutableException
Constructor.- Parameters:
causedBy- The cause of this exception.
-
ExecutableException
Constructor.- Parameters:
causedBy- The cause of this exception.message- TheMessageFormat-style message.args- OptionalMessageFormat-style arguments.
-
-
Method Details
-
getTargetException
If the thrown exception was anInvocationTargetExceptionreturns the target exception. Otherwise returns the inner exception which is typicallyIllegalArgumentExceptionorIllegalAccessException.- Returns:
- The inner throwable.
-
unwrap
Returns the caused-by exception if there is one.- Returns:
- The caused-by exception if there is one, or this exception if there isn't.
-