iro/error.py
branchdevel
changeset 126 1ac2439a68b5
parent 125 19b3f383c9ce
child 128 1a3ebdd3bdaf
equal deleted inserted replaced
125:19b3f383c9ce 126:1ac2439a68b5
    38                 "msg":self.msg,
    38                 "msg":self.msg,
    39                 }
    39                 }
    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 
    43 class NotATelNumber(ValidateException):
       
    44     def __init__(self, number,field=None):
       
    45         msg = "No valid telnumber: '%s'"%(number)
       
    46         ValidateException.__init__(self, 701, field, msg)
       
    47     
       
    48 class InvalidMail(ValidateException):
       
    49     def __init__(self, number,field=None):
       
    50         msg = "No valid email: '%s'"%(number)
       
    51         ValidateException.__init__(self, 702, field, msg)