Imagine that you wish to run a program that takes a long time to run. Just in case somethings goes wrong, you decide to use friendly-traceback (soon to be renamed...) in interactive mode to run it. This turns out to be a good decision:[Image]Time to explore what might be the problem, and where exactly things might have gone wrong. [Image]Ooops ... a silly typo. Easy enough to correct: [Image]Unfortunately, that did not work: Friendly-traceback, like all Python programs designed to handle exceptions, only capture the last one. This has happened to me so many times; granted, it was always with short programs so that I could easily recreate the original exception. However, I can only imagine how frustrating it might be for beginners encountering this situation. A solution Fortunately, you are using the latest version of Friendly-traceback, the one that records exceptions that were captured, and allows you to discard the last one recorded (rinse, and repeat as often as needed), thus going back in history.
[Image] Now that we are set, we can explore further to determine what might have gone wrong.
[Image]
posted by André Roberge at 12:58 PM on Mar 6, 2021
"Going back in history"
No comments yet. -