An Exception that can be used to signal XML validation errors.
Constructor: |
public ValidationException() {
super();
}
Creates a new ValidationException with no message or nested Exception. |
public ValidationException(String message) {
super(message);
}
Creates a new ValidationException with the given message. Parameters:
message - the message for this Exception
|
public ValidationException(Throwable exception) {
super(exception);
}
Creates a new ValidationException with the given nested Exception. Parameters:
exception - the nested Exception
|
public ValidationException(String message,
int errorCode) {
super(message, errorCode);
}
Creates a new ValidationException with the given message. Parameters:
message - the message for this Exception
errorCode - the errorCode for this Exception
|
public ValidationException(String message,
Throwable exception) {
super(message, exception);
}
Creates a new ValidationException with the given message and nested
Exception. Parameters:
message - the detail message for this Exception
exception - the nested Exception
|
public ValidationException(String message,
Exception exception,
int errorCode) {
super(message, exception, errorCode);
}
Creates a new ValidationException 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 from org.exolab.castor.xml.ValidationException Detail: |
public Location getLocation() {
return _location;
}
Returns the location of the Exception. |
public ValidationException getNext() {
return _next;
}
Returns the next ValidationException in the list, or null if no
additional validation exceptions exist. |
protected boolean remove(ValidationException exception) {
if (exception == null) {
return false;
}
ValidationException previous = this;
for (ValidationException current = _next; current != null;
previous = current, current = current._next) {
if (current == exception) {
previous._next = current._next;
current._next = null;
return true;
}
}
return false;
}
Removes the given ValidationException from the current list of
ValidationException. |
protected void setLast(ValidationException exception) {
if (exception == null) {
return;
}
ValidationException current = this;
while (current._next != null) {
current = current._next;
}
current._next = exception;
}
Adds the given ValidationException as the last exception in the list.
This is equivalent to calling #setNext if no additional
ValidationException(s) exist. |
public void setLocation(Location location) {
_location = location;
}
Sets the location information for this ValidationException. |
public void setNext(ValidationException exception) {
_next = exception;
}
Sets the given ValidationException as the next Exception in the list.
This method will overwrite any existing ValidationException that may
already exist as the next Exception. |
public String toString() {
final StringBuffer sb = new StringBuffer();
if (getNext() != null) {
int count = 1;
for (ValidationException vx = this; vx != null; vx = vx.getNext()) {
if (count > 1) {
sb.append("\n\n");
}
sb.append(count);
sb.append(". ");
dumpOneException(sb, vx);
++count;
}
} else {
dumpOneException(sb, this);
}
return sb.toString();
}
Returns the String representation of this ValidationException. |