org.exolab.castor.xml
public class: XMLException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.exolab.castor.core.exceptions.CastorException
org.exolab.castor.xml.XMLException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SchemaException, ResolverException, ValidationException, MarshalException
An exception that is used to signal an error that has occured during
marshaling or unmarshaling.
Constructor: |
public XMLException() {
super();
}
Creates a new XMLException with no message or nested Exception. |
public XMLException(String message) {
super(message);
}
Creates a new XMLException with the given message. Parameters:
message - the message for this Exception
|
public XMLException(Throwable exception) {
super(exception);
}
Creates a new XMLException with the given nested Exception. Parameters:
exception - the nested exception
|
public XMLException(String message,
int errorCode) {
super(message);
this.errorCode = errorCode;
}
Creates a new XMLException with the given message and error code. Parameters:
message - the message for this Exception
errorCode - the errorCode for this Exception
|
public XMLException(String message,
Throwable exception) {
super(message, exception);
}
Creates a new XMLException with the given message and nested Exception. Parameters:
message - the detail message for this Exception
exception - the nested exception
|
public XMLException(String message,
Throwable exception,
int errorCode) {
super(message, exception);
this.errorCode = 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
|
Methods from java.lang.Throwable: |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.exolab.castor.xml.XMLException Detail: |
public int getErrorCode() {
return errorCode;
}
Returns the error code for this Exception, or -1 if no error code exists. |
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
}
Sets the error code for this Exception. |
public void setLocation(Location location) {
_location = location;
}
Sets the location information for this Exception. |
public String toString() {
StringBuffer buff = new StringBuffer();
buff.append(this.getClass().getName());
String msg = this.getMessage();
if (msg != null) {
buff.append(": ").append(msg);
}
if (this._location != null) {
buff.append("{").append(this._location).append("}");
}
return buff.toString();
}
Returns the String representation of this Exception. |