API: Clean up uncaught exception backtrace output