Add call stack to RuntimeException based errors
This commit is contained in:
@@ -9,6 +9,9 @@ class RuntimeException(SmnpException):
|
||||
def _title(self):
|
||||
return "Runtime Error"
|
||||
|
||||
def _postMessage(self):
|
||||
return "\n" + self.environment.callStackToString() if len(self.environment.callStack) > 0 else ""
|
||||
|
||||
# def message(self):
|
||||
# posStr = "" if self.pos is None else f" [line {self.pos[0] + 1}, col {self.pos[1] + 1}]"
|
||||
# return f"Runtime error{posStr}:\n{self.mmsg}"
|
||||
|
||||
Reference in New Issue
Block a user