Add call stack to RuntimeException based errors

This commit is contained in:
Bartłomiej Pluta
2019-07-10 12:53:58 +02:00
parent d10df10282
commit 9ea2202d14
7 changed files with 39 additions and 24 deletions

View File

@@ -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}"