diff Python/codecs.c @ 25442:898304f6da23 2.2

Add encoding in LookupError. Fixes #615013.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 26 Sep 2002 16:04:31 +0000
parents 25ddd3dc7a7a
children cac1b034b903
line wrap: on
line diff
--- a/Python/codecs.c	Thu Sep 26 15:53:28 2002 +0000
+++ b/Python/codecs.c	Thu Sep 26 16:04:31 2002 +0000
@@ -197,8 +197,8 @@
     }
     if (i == len) {
 	/* XXX Perhaps we should cache misses too ? */
-	PyErr_SetString(PyExc_LookupError,
-			"unknown encoding");
+	PyErr_Format(PyExc_LookupError,
+                     "unknown encoding: %s", encoding);
 	goto onError;
     }