| 57 | |
| 58 | # A class to check exception |
| 59 | class ExceptionCheck(object): |
| 60 | def __init__(self, FilePath = None): |
| 61 | self.ExceptionList = [] |
| 62 | self.ExceptionListXml = ExceptionListXml() |
| 63 | self.LoadExceptionListXml(FilePath) |
| 64 | |
| 65 | def LoadExceptionListXml(self, FilePath): |
| 66 | if FilePath and os.path.isfile(FilePath): |
| 67 | self.ExceptionListXml.FromXmlFile(FilePath) |
| 68 | self.ExceptionList = self.ExceptionListXml.ToList() |
| 69 | |
| 70 | def IsException(self, ErrorID, KeyWord, FileID=-1): |
| 71 | if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList: |
| 72 | return True |
| 73 | else: |
| 74 | return False |
| 75 | |
| 76 | ## |
| 77 | # |
no outgoing calls
no test coverage detected