TECH ARENA

How to create a traceback object in Python – Markus Unterwaditzer

I’ve been writing a library for errorhandling when calling Rust code from Python. One peculiar challenge I faced was when I wanted to have stacktraces that look like this: So when we call some Rust code from Python, and the Rust code fails, we get this merged traceback with the Rust frames stitched onto it. To me personally this kind of error reporting is very appealing. If you think this is too much magic, you will not like what comes next. We’ll explore how to do exactly that, how to add extra frames to a…

Related TECH News