def __init__(self, value): """ >>> raise VdtPathDoesNotExist('/not/a/path') Traceback (most recent call last): VdtValueTooSmallError: the path "/not/a/path" does not exist """ ValidateError.__init__(self, 'the path "%s" does not exist' % (value, ))
def __init__(self, value, max_length): """ >>> raise VdtPathTooLong('/path/too/long') Traceback (most recent call last): VdtValueTooSmallError: the path "/path/too/long" exceeds the maximum length of <length> characters """ ValidateError.__init__( self, 'the path "%s" exceeds the maximum length of %s characters' % (value, max_length))
def __init__(self, value, reason): ValidateError.__init__(self, "the value '%s' is unacceptable.\n" "Reason: %s" % (value, reason))
def __init__(self, value, reason): ValidateError.__init__( self, "the value '%s' is unacceptable.\n" "Reason: %s" % (value, reason))