MCPcopy Create free account
hub / github.com/WwwwwyDev/crawlipt / ScriptSyntaxError

Class ScriptSyntaxError

crawlipt/script.py:18–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class 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
42def dfs_search(obj):

Callers 2

__condition_checkMethod · 0.85
syntax_checkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected