iro/error.py
branchdevel
changeset 128 1a3ebdd3bdaf
parent 126 1ac2439a68b5
child 129 d6704178a18f
equal deleted inserted replaced
127:79966b937274 128:1a3ebdd3bdaf
    40     def __str__(self):
    40     def __str__(self):
    41         return "%i:%s"%(self.code,self.msg)
    41         return "%i:%s"%(self.code,self.msg)
    42 
    42 
    43 class NotATelNumber(ValidateException):
    43 class NotATelNumber(ValidateException):
    44     def __init__(self, number,field=None):
    44     def __init__(self, number,field=None):
       
    45         self.number = number
    45         msg = "No valid telnumber: '%s'"%(number)
    46         msg = "No valid telnumber: '%s'"%(number)
    46         ValidateException.__init__(self, 701, field, msg)
    47         ValidateException.__init__(self, 701, field, msg)
    47     
    48     
    48 class InvalidMail(ValidateException):
    49 class InvalidMail(ValidateException):
    49     def __init__(self, number,field=None):
    50     def __init__(self, number,field=None):
       
    51         self.number = number
    50         msg = "No valid email: '%s'"%(number)
    52         msg = "No valid email: '%s'"%(number)
    51         ValidateException.__init__(self, 702, field, msg)
    53         ValidateException.__init__(self, 702, field, msg)