org.exolab.castor.xml
Class XMLException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.exolab.castor.core.exceptions.CastorException
              extended by org.exolab.castor.xml.XMLException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MarshalException, ResolverException, SchemaException, ValidationException

public class XMLException
extends CastorException

An exception that is used to signal an error that has occured during marshalling or unmarshalling.

Version:
$Revision: 1.4 $ $Date: 2004/10/05 20:25:33 $
Author:
Keith Visco
See Also:
Serialized Form

Constructor Summary
XMLException()
          Creates a new XMLException with no message or nested Exception.
XMLException(java.lang.String message)
          Creates a new XMLException with the given message.
XMLException(java.lang.String message, int errorCode)
          Creates a new XMLException with the given message.
XMLException(java.lang.String message, java.lang.Throwable exception)
          Creates a new XMLException with the given message and nested exception.
XMLException(java.lang.String message, java.lang.Throwable exception, int errorCode)
          Creates a new XMLException with the given message, nested exception, and errorCode.
XMLException(java.lang.Throwable exception)
          Creates a new XMLException with the given nested exception.
 
Method Summary
 int getErrorCode()
          Returns the error code for this Exception, or -1 if no error code exists.
 void setErrorCode(int errorCode)
          Sets the error code for this Exception
 void setLocation(Location location)
          Sets the location information for this Exception
 java.lang.String toString()
          Returns the String representation of this Exception.
 
Methods inherited from class org.exolab.castor.core.exceptions.CastorException
getCause, getException, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLException

public XMLException()
Creates a new XMLException with no message or nested Exception.


XMLException

public XMLException(java.lang.String message)
Creates a new XMLException with the given message.

Parameters:
message - the message for this Exception

XMLException

public XMLException(java.lang.Throwable exception)
Creates a new XMLException with the given nested exception.

Parameters:
exception - the nested exception

XMLException

public XMLException(java.lang.String message,
                    int errorCode)
Creates a new XMLException with the given message.

Parameters:
message - the message for this Exception
errorCode - the errorCode for this Exception

XMLException

public XMLException(java.lang.String message,
                    java.lang.Throwable exception)
Creates a new XMLException with the given message and nested exception.

Parameters:
message - the detail message for this exception
exception - the nested exception

XMLException

public XMLException(java.lang.String message,
                    java.lang.Throwable exception,
                    int errorCode)
Creates a new XMLException with the given message, nested exception, and errorCode.

Parameters:
message - the detail message for this exception
exception - the nested exception
errorCode - the errorCode for this Exception
Method Detail

setLocation

public void setLocation(Location location)
Sets the location information for this Exception

Parameters:
location, - the location information for this validation exception

toString

public java.lang.String toString()
Returns the String representation of this Exception.

Overrides:
toString in class java.lang.Throwable
Returns:
the String representation of this Exception.

getErrorCode

public int getErrorCode()
Returns the error code for this Exception, or -1 if no error code exists.

Returns:
the error code for this Exception, or -1 if no error code exists

setErrorCode

public void setErrorCode(int errorCode)
Sets the error code for this Exception

Parameters:
errorCode - the error code


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com