add non-native exception in traceback_test
Co-authored-by: Dan Halbert <halbert@adafruit.com>
This commit is contained in:
parent
70b3e73349
commit
7e46387196
@ -22,4 +22,15 @@ except Exception as exc:
|
|||||||
traceback.print_exception(None, exc, exc.__traceback__, limit=0)
|
traceback.print_exception(None, exc, exc.__traceback__, limit=0)
|
||||||
print("\nLimit=-1 Trace:")
|
print("\nLimit=-1 Trace:")
|
||||||
traceback.print_exception(None, exc, exc.__traceback__, limit=-1)
|
traceback.print_exception(None, exc, exc.__traceback__, limit=-1)
|
||||||
|
|
||||||
|
|
||||||
|
class NonNativeException(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
raise NonNativeException("test")
|
||||||
|
except Exception as e:
|
||||||
|
print("\nNonNative Trace:")
|
||||||
|
traceback.print_exception(None, e, e.__traceback__)
|
||||||
print("")
|
print("")
|
||||||
|
@ -21,3 +21,8 @@ Traceback (most recent call last):
|
|||||||
File "circuitpython/traceback_test.py", line 9, in fun
|
File "circuitpython/traceback_test.py", line 9, in fun
|
||||||
Exception: test
|
Exception: test
|
||||||
|
|
||||||
|
NonNative Trace:
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "circuitpython/traceback_test.py", line 32, in <module>
|
||||||
|
NonNativeException: test
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user