The main purpose of this is having nice backtraces in gdb, although it also slightly simplifies poisoning state of the API consumers after a panic.