diff Python/codecs.c @ 25441:d32588c88633 legacy-trunk

Add encoding name in LookupError. Fixes #615013. Will backport to 2.2.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 26 Sep 2002 16:01:24 +0000
parents 1b80e0fd5a48
children 910fa739f4a4
line wrap: on
line diff
--- a/Python/codecs.c	Thu Sep 26 13:19:48 2002 +0000
+++ b/Python/codecs.c	Thu Sep 26 16:01:24 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;
     }