I initially thought I could pass the traceback with the exception, but
it seems transmitting exceptions around with their tracebacks intact is
not so easy. There's a library which does this:
https://github.com/ionelmc/python-tblib
But this doesn't seem important enough to introduce a dependency..