FileDocCategorySizeDatePackage
ConfigurationException.javaAPI DocApache Axis 1.43612Sat Apr 22 18:57:28 BST 2006org.apache.axis

ConfigurationException

public class ConfigurationException extends IOException
ConfigurationException is thrown when an error occurs trying to use an EngineConfiguration.
author
Glyn Normington (glyn@apache.org)

Fields Summary
private Exception
containedException
The contained exception if present.
private String
stackTrace
protected static boolean
copyStackByDefault
Flag wether to copy the orginal exception by default.
protected static Log
log
The 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.

param
message String form of the error


                                     
       
        super(message);
        if(copyStackByDefault) {
            stackTrace= JavaUtils.stackToString(this);
        }
        logException( this);
    
public ConfigurationException(Exception exception)
Construct a ConfigurationException from an Exception.

param
exception original exception which was unexpected

        this(exception,copyStackByDefault);
    
public ConfigurationException(Exception exception, boolean copyStack)
Construct a ConfigurationException from an Exception.

param
exception original exception which was unexpected
param
copyStack set to true to copy the orginal exception's stack

        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.ExceptiongetContainedException()
Get any contained exception.

return
base exception or null
since
axis1.1

        return containedException;
    
private voidlogException(java.lang.Exception exception)
single point for logging exceptions.

param
exception

        log.debug("Exception: ", exception);
    
public java.lang.StringtoString()
Stringify, including stack trace.

return
a String view of this object

        String stack;
        if(stackTrace.length()== 0) {
            stack = "";
        } else {
            stack="\n"+stackTrace;
        }
        return super.toString()+stack;