diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1999-06-21 16:18:51 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1999-06-21 16:18:51 (GMT) |
commit | 58b2eacf6b53fff92ecad3233073efbd5ca756d2 (patch) | |
tree | d47ddd929ab12bce6156121d479481f005d2137c /Mac/Modules/drag | |
parent | c4f6331690a379624a1230110123a2c6ddaff72b (diff) | |
download | cpython-58b2eacf6b53fff92ecad3233073efbd5ca756d2.zip cpython-58b2eacf6b53fff92ecad3233073efbd5ca756d2.tar.gz cpython-58b2eacf6b53fff92ecad3233073efbd5ca756d2.tar.bz2 |
Print something on stderr in case of exceptions in callback routines.
Diffstat (limited to 'Mac/Modules/drag')
-rw-r--r-- | Mac/Modules/drag/Dragmodule.c | 12 | ||||
-rw-r--r-- | Mac/Modules/drag/dragsupport.py | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/Mac/Modules/drag/Dragmodule.c b/Mac/Modules/drag/Dragmodule.c index b029067..0775286 100644 --- a/Mac/Modules/drag/Dragmodule.c +++ b/Mac/Modules/drag/Dragmodule.c @@ -970,8 +970,10 @@ dragglue_TrackingHandler(DragTrackingMessage theMessage, WindowPtr theWindow, return -1; rv = PyEval_CallObject((PyObject *)handlerRefCon, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in TrackingHandler\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; @@ -993,8 +995,10 @@ dragglue_ReceiveHandler(WindowPtr theWindow, void *handlerRefCon, return -1; rv = PyEval_CallObject((PyObject *)handlerRefCon, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in ReceiveHandler\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; @@ -1019,8 +1023,10 @@ dragglue_SendData(FlavorType theType, void *dragSendRefCon, return -1; rv = PyEval_CallObject(self->sendproc, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in SendDataHandler\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; diff --git a/Mac/Modules/drag/dragsupport.py b/Mac/Modules/drag/dragsupport.py index 9e25328..64274a6 100644 --- a/Mac/Modules/drag/dragsupport.py +++ b/Mac/Modules/drag/dragsupport.py @@ -89,8 +89,10 @@ dragglue_TrackingHandler(DragTrackingMessage theMessage, WindowPtr theWindow, return -1; rv = PyEval_CallObject((PyObject *)handlerRefCon, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in TrackingHandler\\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; @@ -112,8 +114,10 @@ dragglue_ReceiveHandler(WindowPtr theWindow, void *handlerRefCon, return -1; rv = PyEval_CallObject((PyObject *)handlerRefCon, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in ReceiveHandler\\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; @@ -138,8 +142,10 @@ dragglue_SendData(FlavorType theType, void *dragSendRefCon, return -1; rv = PyEval_CallObject(self->sendproc, args); Py_DECREF(args); - if ( rv == NULL ) + if ( rv == NULL ) { + fprintf(stderr, "Drag: Exception in SendDataHandler\\n"); return -1; + } i = -1; if ( rv == Py_None ) i = 0; |