Rewritten default 'except' code using traceback