[pypy-commit] pypy default: improve the error message
antocuni
noreply at buildbot.pypy.org
Wed Aug 22 18:52:24 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r56809:699b45a65495
Date: 2012-08-22 17:15 +0200
http://bitbucket.org/pypy/pypy/changeset/699b45a65495/
Log: improve the error message
diff --git a/pypy/rlib/objectmodel.py b/pypy/rlib/objectmodel.py
--- a/pypy/rlib/objectmodel.py
+++ b/pypy/rlib/objectmodel.py
@@ -163,8 +163,8 @@
#
s_argtype = get_annotation(get_type_descr_of_argument(arg))
if not s_expected.contains(s_argtype):
- msg = "%s argument number %d must be of type %s" % (
- f.func_name, i+1, expected_type)
+ msg = "%s argument %r must be of type %s" % (
+ f.func_name, srcargs[i], expected_type)
raise TypeError, msg
#
# we cannot simply wrap the function using *args, **kwds, because it's
More information about the pypy-commit
mailing list