| 16 | |
| 17 | |
| 18 | class ScriptSyntaxError(Exception): |
| 19 | def __init__(self, e: Exception, method: str, deep: str): |
| 20 | self.e = e |
| 21 | self.method = method |
| 22 | self.deep = deep |
| 23 | |
| 24 | def __str__(self): |
| 25 | info = "" |
| 26 | params = "" |
| 27 | doc = "" |
| 28 | if self.method and self.method in ScriptProcess.ACTIONS.keys(): |
| 29 | params = "\ndef " + self.method + " " + signature(Script.ACTIONS[self.method]).__str__() |
| 30 | doc = ScriptProcess.ACTIONS[self.method].__doc__ |
| 31 | info = "----------------------method info--------------------------" |
| 32 | elif self.method and self.method in ScriptProcess.CONDITIONS.keys(): |
| 33 | params = "\ndef " + self.method + " " + signature(Script.CONDITIONS[self.method]).__str__() |
| 34 | doc = ScriptProcess.CONDITIONS[self.method].__doc__ |
| 35 | info = "----------------------condition info--------------------------" |
| 36 | error = "[" + self.e.__class__.__name__ + "] " + self.e.__str__() + "\n" |
| 37 | if not doc: |
| 38 | doc = "" |
| 39 | return "(Deep:%s method:%s) arguments is wrong\n" % (self.deep, self.method) + error + info + params + doc |
| 40 | |
| 41 | |
| 42 | def dfs_search(obj): |
no outgoing calls
no test coverage detected