← index #4667Issue #7464
Related · high · value 1.332
QUERY · ISSUE

Print traceback without an exception

openby mzakharocscopened 2019-04-02updated 2019-05-14

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

'module' object has no attribute 'exc_info'

closedby majoson-chenopened 2021-06-26updated 2024-06-15

sys.exc_info doesn't seem to be implemented yet, but sys.print_exception was already exist.
I think it won't be too difficult to open the exc_info interface based on the implementation of sys.print_exception, but it will be useful for logging and troubleshooting.

some module like traceback and logging need this interface to work normally.
Hope you can adopt my suggestion.
Tks!

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied