QUERY · ISSUE
Print traceback without an exception
Hello, in CPython, there is a way to print a traceback outside of an exception, through traceback.print_stack() function. What would it take to add similar functionality to micropython?
CANDIDATE · ISSUE
Exception chaining not implemented
This is mostly for tracking differences from CPython.
Also, can discuss if we need this.
Doc: http://legacy.python.org/dev/peps/pep-3134/
Roughly, raising a new exception (not reraising) when we handle another exception, chains them. But CPython prints them not like Java, but upside down:
Traceback (most recent call last):
File "try-reraise3.py", line 5, in <module>
raise ValueError
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "try-reraise3.py", line 7, in <module>
raise TypeError
TypeError
(But I guess Python prints traceback in reverse order comparing to java either, so the above behavior would be "natural" (the "most important" info printed last)).