Skip to content

How to use rich Traceback with raise errors? #1461

Answered by willmcgugan
codenotworking asked this question in Q&A
Discussion options

You must be logged in to vote

The print_exception method will only work when there is an exception to print, i.e. within an except: block.

i.e. something like this:

try:
    some_function("foo")
except:
    console.print_exception(show_locals=True)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by codenotworking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants