]> granicus.if.org Git - python/commitdiff
Ugh, by all means, _do_ report exceptions somehow ;-)
authorJust van Rossum <just@letterror.com>
Fri, 4 Jan 2002 13:49:36 +0000 (13:49 +0000)
committerJust van Rossum <just@letterror.com>
Fri, 4 Jan 2002 13:49:36 +0000 (13:49 +0000)
Mac/Modules/ae/_AEmodule.c
Mac/Modules/ae/aesupport.py

index 4304d959e4acbce0e89060e899f8a8f100ca3063..4db840e75fa7ada5e094f6465253b2b1ee9fd033 100644 (file)
@@ -1242,8 +1242,11 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype ref
        replyObject->ob_itself.descriptorType = 'null';
        replyObject->ob_itself.dataHandle = NULL;
        Py_DECREF(args);
-       if (res == NULL)
+       if (res == NULL) {
+               PySys_WriteStderr("Exception in AE event handler function\n");
+               PyErr_Print();
                return -1;
+       }
        Py_DECREF(res);
        return noErr;
 }
index c12e5b6f571451602bbd70d7603317e13113e29e..216185794ecae888b09a6f0325021c313e3f8ae0 100644 (file)
@@ -148,8 +148,11 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype ref
        replyObject->ob_itself.descriptorType = 'null';
        replyObject->ob_itself.dataHandle = NULL;
        Py_DECREF(args);
-       if (res == NULL)
+       if (res == NULL) {
+               PySys_WriteStderr("Exception in AE event handler function\\n");
+               PyErr_Print();
                return -1;
+       }
        Py_DECREF(res);
        return noErr;
 }