+ 2
Why does the raised exception not get printed out?
5 Respostas
+ 2
But if you look at the fourth line of the code, one side says or g
0
If you are going to print the exception, it is better to use print(repr(e)) ; the base Exception. __str__ implementation only returns the exception message, not the type. Or, use the traceback module, which has methods for printing the current exception, formatted, or the full traceback.
Regards,
J Wick