[Python-checkins] CVS: python/dist/src/Mac/Modules/drag _Dragmodule.c,1.6,1.7 dragsupport.py,1.8,1.9

Just van Rossum jvr@users.sourceforge.net
Fri, 04 Jan 2002 06:39:31 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/drag
In directory usw-pr-cvs1:/tmp/cvs-serv23429

Modified Files:
	_Dragmodule.c dragsupport.py 
Log Message:
Callback error handling improvements:
- print traceback
- don't use fprintf()
- clear exception (implied by PyErr_Print())

Index: _Dragmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/_Dragmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** _Dragmodule.c	2001/12/18 15:37:53	1.6
--- _Dragmodule.c	2002/01/04 14:39:29	1.7
***************
*** 899,903 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in TrackingHandler\n");
  		return -1;
  	}
--- 899,904 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in TrackingHandler\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 924,928 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in ReceiveHandler\n");
  		return -1;
  	}
--- 925,930 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in ReceiveHandler\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 952,956 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in SendDataHandler\n");
  		return -1;
  	}
--- 954,959 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in SendDataHandler\n");
! 		PyErr_Print();
  		return -1;
  	}

Index: dragsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/dragsupport.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** dragsupport.py	2001/09/05 10:31:32	1.8
--- dragsupport.py	2002/01/04 14:39:29	1.9
***************
*** 83,87 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in TrackingHandler\\n");
  		return -1;
  	}
--- 83,88 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in TrackingHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 108,112 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in ReceiveHandler\\n");
  		return -1;
  	}
--- 109,114 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in ReceiveHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 136,140 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in SendDataHandler\\n");
  		return -1;
  	}
--- 138,143 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in SendDataHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}