Package orm2 :: Module exceptions :: Class ValidatorException
[hide private]
[frames] | no frames]

Class ValidatorException

source code

exceptions.Exception --+    
                       |    
            ORMException --+
                           |
                          ValidatorException
Known Subclasses:
DateValidatorException, LengthValidatorException, NotEmptyError, NotNullError, RangeValidatorError, ReValidatorException

Parentclass for all those exceptions raised by validators. Those exceptions must always contain the dbobj, dbproperty and value that caused the exception along with a plausible error message(! ;-) This is ment to aid debugging and the creation of even more specific error message than a generic validator could contain. (The idea is that the message stored in the exception is an error for the programmer, the error message for the user will be created from those values).

Instance Methods [hide private]
  __init__(self, message, dbobj, dbproperty, value)

Inherited from exceptions.Exception: __getitem__, __str__


Method Details [hide private]

__init__(self, message, dbobj, dbproperty, value)
(Constructor)

source code 
Parameters:
  • message - String(!) error message that goes into the regular exception object. This is intended for programmers (see above) and thus should be generic and in English.
  • dbobj - The dbobject whoes property was supposed to be set
  • dbproperty - The actual dbproperty that was supposed to be set
  • value - A Python object (as opposed to a repr()) of the value the dbproperty was supposed to be set to
Overrides: exceptions.Exception.__init__