[pywin32-bugs] [ pywin32-Patches-977399 ] Support for user supplied exception handler
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-10-07 08:46:24
|
Patches item #977399, was opened at 2004-06-22 21:54 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=977399&group_id=78018 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Adal Chiriliuc (adalx) Assigned to: Nobody/Anonymous (nobody) Summary: Support for user supplied exception handler Initial Comment: win32ui.h 1. Added ExceptionHandler declarations. win32uimodule.cpp 1. Converted Python_run_command_with_log to use ExceptionHandler. 2. Converted gui_print_error to use ExceptionHandler. 3. Added TRACE to gui_print_error which warns about recursive call. 4. Implemented ExceptionHandler. win32thread.cpp 1. Converted to use ExceptionHandler. win32virt.cpp 1. Fixed crash if we re-enter the error handler. Example: Document.OnDraw raises. We show a dialog box with the traceback. The dialog box being displayed in front of the document will trigger on move another WM_PAINT. This will trigger Document.OnDraw which will probably raise again. So while being in the error handling routine, we enter it again! gui_error_print is protected against this, but the line will fail "char *szRepr = PyString_AsString(obRepr);" because obRepr is NULL (at least on my machine). 2. Converted to use ExceptionHandler. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2004-10-07 18:46 Message: Logged In: YES user_id=14198 Looks good to me. I don't have time to test it, but it looks nicely done, and I'm inclined to trust you :) Checking in win32thread.cpp; new revision: 1.6; previous revision: 1.5 Checking in win32ui.h; new revision: 1.3; previous revision: 1.2 Checking in win32uimodule.cpp; new revision: 1.29; previous revision: 1.28 Checking in win32virt.cpp; new revision: 1.2; previous revision: 1.1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=977399&group_id=78018 |