]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Print something on stderr in case of exceptions in callback routines.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jun 1999 16:18:51 +0000 (16:18 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 21 Jun 1999 16:18:51 +0000 (16:18 +0000)
Mac/Modules/drag/Dragmodule.c
Mac/Modules/drag/dragsupport.py

index b029067b8793f00764bd7764f1491487f7ae1257..0775286046b6d327ad19bae2e1bb441797153e88 100644 (file)
@@ -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;
index 9e25328338ca49a23072e69c79c9bff619fb6e5a..64274a6fdf776c30488fe1c8c981ad782b102f94 100644 (file)
@@ -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;