org.sapia.validator
Class ValidationErr

java.lang.Object
  extended by org.sapia.validator.ValidationErr

public class ValidationErr
extends java.lang.Object

An instance of this class represents a validation error.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 java.lang.String getId()
          Returns the identifier of the rule that failed.
 java.lang.String getMsg()
          Returns the message of this error.
 java.lang.String getStackTrace()
          Returns the stack trace of the Throwable that this instance encapsulates.
 java.lang.Throwable getThrowable()
          Returns the Throwable of this instance, if the latter was indeed constructed with a Throwable.
 boolean isThrowable()
          Returns true if this instance was constructed with a Throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public java.lang.String getId()
Returns the identifier of the rule that failed.

Returns:
the identifier of a Rule.

getMsg

public java.lang.String getMsg()
Returns the message of this error. If this instance encapsulates a Throwable, then that instance's message is returned.

Returns:
a message, or null if no message was set.

getThrowable

public java.lang.Throwable getThrowable()
Returns the Throwable of this instance, if the latter was indeed constructed with a Throwable.

Returns:
a Throwable.

isThrowable

public boolean isThrowable()
Returns true if this instance was constructed with a Throwable.

Returns:
true if this instance was constructed with a Throwable.

getStackTrace

public java.lang.String getStackTrace()
Returns the stack trace of the Throwable that this instance encapsulates. Client applications should ensure that the internal error object is indeed a Throwable by calling the isThrowable() method on this instance.

Returns:
the stacktrace of this instance's internal Throwable, as a string.
See Also:
isThrowable().


Copyright © 2011 Sapia OSS. All Rights Reserved.