Ugh, by all means, _do_ report exceptions somehow ;-)

This commit is contained in:
Just van Rossum 2002-01-04 13:49:36 +00:00
parent 0cae01c496
commit 3e584aaa2a
2 changed files with 8 additions and 2 deletions

View 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;
}

View 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;
}