Automatic backtrace-on-throw exception logger