| 46 | |
| 47 | """Base class for handling all the application generated exception""" |
| 48 | class ApplicationException(Exception): |
| 49 | |
| 50 | def __init__(self, fileName, errno, msg = ""): |
| 51 | self.fileName = fileName |
| 52 | self.errno = errno |
| 53 | self.mess = errorTable[errno] + msg |
| 54 | self.message = 'Application ERROR:'+repr(self.fileName+'-'+str(self.errno)+'-'+self.mess) |
| 55 | |
| 56 | def __str__(self): |
| 57 | return repr(self.fileName+'-'+str(self.errno)+'-'+self.mess) |
| 58 | |
| 59 | |
| 60 | #--------------------------------Global Function------------------------------- |