[Python-checkins] python/dist/src/Python codecs.c,2.16,2.17

loewis@users.sourceforge.net loewis@users.sourceforge.net
Thu, 26 Sep 2002 09:01:26 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv26678

Modified Files:
	codecs.c 
Log Message:
Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.


Index: codecs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/codecs.c,v
retrieving revision 2.16
retrieving revision 2.17
diff -C2 -d -r2.16 -r2.17
*** codecs.c	2 Sep 2002 18:22:32 -0000	2.16
--- codecs.c	26 Sep 2002 16:01:24 -0000	2.17
***************
*** 198,203 ****
      if (i == len) {
  	/* XXX Perhaps we should cache misses too ? */
! 	PyErr_SetString(PyExc_LookupError,
! 			"unknown encoding");
  	goto onError;
      }
--- 198,203 ----
      if (i == len) {
  	/* XXX Perhaps we should cache misses too ? */
! 	PyErr_Format(PyExc_LookupError,
!                      "unknown encoding: %s", encoding);
  	goto onError;
      }