Replaced fprintf(stderr,...) with PySys_WriteStderr(...) where appropriate.

This commit is contained in:
Jack Jansen 1998-10-12 20:53:15 +00:00
parent 3179b36014
commit deff89c8be
17 changed files with 21 additions and 22 deletions

View file

@ -75,7 +75,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
if ( PyOS_InterruptOccurred() )
return 1;
if ( PyMac_HandleEvent(theEvent) < 0 ) {
fprintf(stderr, "Exception in user event handler during AE processing\n");
PySys_WriteStderr("Exception in user event handler during AE processing\n");
PyErr_Clear();
}
return 0;

View file

@ -115,7 +115,7 @@ static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHand
if ( PyOS_InterruptOccurred() )
return 1;
if ( PyMac_HandleEvent(theEvent) < 0 ) {
fprintf(stderr, "Exception in user event handler during AE processing\\n");
PySys_WriteStderr("Exception in user event handler during AE processing\\n");
PyErr_Clear();
}
return 0;

View file

@ -1419,7 +1419,7 @@ mytracker(ctl, part)
if (rv)
Py_DECREF(rv);
else
fprintf(stderr, "TrackControl: exception in tracker function\n");
PySys_WriteStderr("TrackControl: exception in tracker function\n");
}

View file

@ -137,7 +137,7 @@ mytracker(ctl, part)
if (rv)
Py_DECREF(rv);
else
fprintf(stderr, "TrackControl: exception in tracker function\\n");
PySys_WriteStderr("TrackControl: exception in tracker function\\n");
}
"""

View file

@ -73,7 +73,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
Py_DECREF(args);
}
if (res == NULL) {
fprintf(stderr, "Exception in Dialog Filter\n");
PySys_WriteStderr("Exception in Dialog Filter\n");
PyErr_Print();
*itemHit = -1; /* Fake return item */
return 1; /* We handled it */
@ -124,7 +124,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
Py_DECREF(args);
}
if (res == NULL) {
fprintf(stderr, "Exception in Dialog UserItem proc\n");
PySys_WriteStderr("Exception in Dialog UserItem proc\n");
PyErr_Print();
}
Py_XDECREF(res);

View file

@ -59,7 +59,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
Py_DECREF(args);
}
if (res == NULL) {
fprintf(stderr, "Exception in Dialog Filter\\n");
PySys_WriteStderr("Exception in Dialog Filter\\n");
PyErr_Print();
*itemHit = -1; /* Fake return item */
return 1; /* We handled it */
@ -110,7 +110,7 @@ static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
Py_DECREF(args);
}
if (res == NULL) {
fprintf(stderr, "Exception in Dialog UserItem proc\\n");
PySys_WriteStderr("Exception in Dialog UserItem proc\\n");
PyErr_Print();
}
Py_XDECREF(res);

View file

@ -377,7 +377,7 @@ MacOS_HighLevelEventProc(EventRecord *e)
Py_DECREF(args);
}
if (res == NULL) {
fprintf(stderr, "Exception in MacOS_HighLevelEventProc:\n");
PySys_WriteStderr("Exception in MacOS_HighLevelEventProc:\n");
PyErr_Print();
}
else

View file

@ -150,7 +150,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
Py_DECREF(func);
Py_DECREF(key);
if ( *rv == NULL ) {
fprintf(stderr, "--Exception in callback: ");
PySys_WriteStderr("--Exception in callback: ");
PyErr_Print();
return errAEReplyNotArrived;
}

View file

@ -164,7 +164,7 @@ any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **r
Py_DECREF(func);
Py_DECREF(key);
if ( *rv == NULL ) {
fprintf(stderr, "--Exception in callback: ");
PySys_WriteStderr("--Exception in callback: ");
PyErr_Print();
return errAEReplyNotArrived;
}