public class ConfiguredException extends java.lang.Object implements ExceptionGenerator
ExceptionGenerator
implementation that generates the exception from static configuration.
Use this class with ThrowExceptionService
to throw an exception as part of a workflow. The configured message forms the
exception message (i.e. Throwable.getMessage()
).
In the adapter configuration file this class is aliased as configured-exception which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
ConfiguredException() |
ConfiguredException(java.lang.String msg) |
Modifier and Type | Method and Description |
---|---|
ServiceException |
create(AdaptrisMessage msg)
Generate a service exception from the AdaptrisMessage.
|
java.lang.String |
getMessage()
Returns the configured exception message to use.
|
void |
setMessage(java.lang.String s)
Sets the configured exception message to use.
|
public ConfiguredException()
public ConfiguredException(java.lang.String msg)
public java.lang.String getMessage()
public void setMessage(java.lang.String s)
s
- the configured exception message to use.public ServiceException create(AdaptrisMessage msg)
ExceptionGenerator
create
in interface ExceptionGenerator
msg
- the message