[Patches] [ python-Patches-409097 ] sys.excepthook

noreply@sourceforge.net noreply@sourceforge.net
Fri, 16 Mar 2001 04:50:42 -0800


Patches item #409097, was updated on 2001-03-16 04:47
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=409097&group_id=5470

Category: core (C code)
Group: None
Status: Open
Priority: 5
Submitted By: Ka-Ping Yee (ping)
Assigned to: Nobody/Anonymous (nobody)
Summary: sys.excepthook

Initial Comment:
This patch separates out the traceback-displaying
functionality of PyErr_PrintEx into a new routine,
PyErr_Display(exc, val, tb).  PyErr_PrintEx finds and
calls sys.excepthook, and the new function
sys.excepthook calls PyErr_Display.

This allows user customization of top-level exception
handling (in particular, you can write Python routines
to install as sys.excepthook that display function
arguments or format tracebacks nicely in HTML for CGI
scripts).

This is a minimal patch just to implement
sys.excepthook.
A more complete patch, postponed for 2.2, factors out
the SystemExit handling in PyErr_PrintEx into a
separate
routine and replaces all of the C code in PyErr_Display
and PyTraceBack_Print with shorter, more maintainable
Python code in the traceback module.

----------------------------------------------------------------------

>Comment By: Ka-Ping Yee (ping)
Date: 2001-03-16 04:50

Message:
Logged In: YES 
user_id=45338

Upload got botched.  Trying again.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=409097&group_id=5470