com.redhat.rhn.common.validator
Class ValidatorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.redhat.rhn.common.RhnRuntimeException
                  extended by com.redhat.rhn.common.validator.ValidatorException
All Implemented Interfaces:
java.io.Serializable

public class ValidatorException
extends RhnRuntimeException

A RuntimeException indicating a fatal failure trying to use the ValidatorService

See Also:
Serialized Form

Constructor Summary
ValidatorException(java.lang.String message)
          Constructor
ValidatorException(java.lang.String message, java.lang.Throwable cause)
          Constructor
ValidatorException(ValidatorResult valResult)
           
 
Method Summary
 java.lang.String getMessage()
          
 ValidatorResult getResult()
           
static void raiseException(java.lang.String key, java.lang.Object... args)
          Helper method to raise a ValidatorException given a single error msg
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidatorException

public ValidatorException(java.lang.String message)
Constructor

Parameters:
message - exception message

ValidatorException

public ValidatorException(java.lang.String message,
                          java.lang.Throwable cause)
Constructor

Parameters:
message - exception message
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

ValidatorException

public ValidatorException(ValidatorResult valResult)
Parameters:
valResult - attach a validator result to the exception.
Method Detail

raiseException

public static void raiseException(java.lang.String key,
                                  java.lang.Object... args)
Helper method to raise a ValidatorException given a single error msg

Parameters:
key - the msg key
args - the args that go with the key.

getMessage

public java.lang.String getMessage()

Overrides:
getMessage in class java.lang.Throwable

getResult

public ValidatorResult getResult()
Returns:
a validator list associated to this exception or null if that doesnot exist.