ConfigurationExceptionpublic class ConfigurationException extends IOException ConfigurationException is thrown when an error occurs trying to
use an EngineConfiguration. |
Fields Summary |
---|
private Exception | containedExceptionThe contained exception if present. | private String | stackTrace | protected static boolean | copyStackByDefaultFlag wether to copy the orginal exception by default. | protected static Log | logThe Log used by this class for logging all messages. |
Constructors Summary |
---|
public ConfigurationException(String message)Construct a ConfigurationException from a String. The string is wrapped
in an exception, enabling a stack traceback to be obtained.
super(message);
if(copyStackByDefault) {
stackTrace= JavaUtils.stackToString(this);
}
logException( this);
| public ConfigurationException(Exception exception)Construct a ConfigurationException from an Exception.
this(exception,copyStackByDefault);
| public ConfigurationException(Exception exception, boolean copyStack)Construct a ConfigurationException from an Exception.
super(exception.toString() + (copyStack ? "\n"
+ JavaUtils.stackToString(exception) : "" ));
containedException = exception;
if(copyStack) {
stackTrace = JavaUtils.stackToString(this);
}
// Log the exception the first time it appears.
if (!(exception instanceof ConfigurationException)) {
logException(exception);
}
|
Methods Summary |
---|
public java.lang.Exception | getContainedException()Get any contained exception.
return containedException;
| private void | logException(java.lang.Exception exception)single point for logging exceptions.
log.debug("Exception: ", exception);
| public java.lang.String | toString()Stringify, including stack trace.
String stack;
if(stackTrace.length()== 0) {
stack = "";
} else {
stack="\n"+stackTrace;
}
return super.toString()+stack;
|
|