Package org.apache.struts2
Class StrutsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.struts2.StrutsException
- All Implemented Interfaces:
- Serializable,- Locatable
- Direct Known Subclasses:
- ConfigurationException,- ReflectionException,- TypeConversionException
A generic runtime exception that optionally contains Location information
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs aStrutsExceptionwith no detail message.Constructs aStrutsExceptionwith the specified detail message.StrutsException(String s, Object target) Constructs aStrutsExceptionwith the specified detail message and target.StrutsException(String s, Throwable cause) Constructs aStrutsExceptionwith the specified detail message and exception cause.StrutsException(String s, Throwable cause, Object target) Constructs aStrutsExceptionwith the specified detail message, cause, and targetStrutsException(Throwable cause) Constructs aStrutsExceptionwith the root causeStrutsException(Throwable cause, Object target) Constructs aStrutsExceptionwith the root cause and target
- 
Method SummaryModifier and TypeMethodDescriptionGets the location of the error, if availabletoString()Returns a short description of this throwable object, including the location.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
- 
Constructor Details- 
StrutsExceptionpublic StrutsException()Constructs aStrutsExceptionwith no detail message.
- 
StrutsExceptionConstructs aStrutsExceptionwith the specified detail message.- Parameters:
- s- the detail message.
 
- 
StrutsExceptionConstructs aStrutsExceptionwith the specified detail message and target.- Parameters:
- s- the detail message.
- target- the target of the exception.
 
- 
StrutsExceptionConstructs aStrutsExceptionwith the root cause- Parameters:
- cause- The wrapped exception
 
- 
StrutsExceptionConstructs aStrutsExceptionwith the root cause and target- Parameters:
- cause- The wrapped exception
- target- The target of the exception
 
- 
StrutsExceptionConstructs aStrutsExceptionwith the specified detail message and exception cause.- Parameters:
- s- the detail message.
- cause- the wrapped exception
 
- 
StrutsExceptionConstructs aStrutsExceptionwith the specified detail message, cause, and target- Parameters:
- s- the detail message.
- cause- The wrapped exception
- target- The target of the exception
 
 
- 
- 
Method Details- 
getLocationGets the location of the error, if available- Specified by:
- getLocationin interface- Locatable
- Returns:
- the location, null if not available
 
- 
toStringReturns a short description of this throwable object, including the location. If no detailed message is available, it will use the message of the underlying exception if available.
 
-