org.sapia.validator
Class ValidationErr

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

public class ValidationErr
extends 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
 String getId()
          Returns the identifier of the rule that failed.
 String getMsg()
          Returns the message of this error.
 String getStackTrace()
          Returns the stack trace of the Throwable that this instance encapsulates.
 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 String getId()
Returns the identifier of the rule that failed.

Returns:
the identifier of a Rule.

getMsg

public 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 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 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 © 2002 Sapia Open Community, Inc. All Rights Reserved.