Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r54785:a91776704352
Date: 2012-04-28 10:38 +0200
http://bitbucket.org/pypy/pypy/changeset/a91776704352/

Log:    In case of typo, the flow object space complained typically like
        that:

         found an operation that always raises AttributeError: generated
        by a constant operation: getattr

        That's very very uninformative. Display at least the arguments of
        the getattr operation.

diff --git a/pypy/objspace/flow/operation.py b/pypy/objspace/flow/operation.py
--- a/pypy/objspace/flow/operation.py
+++ b/pypy/objspace/flow/operation.py
@@ -350,8 +350,8 @@
                     result = op(*args)
                 except Exception, e:
                     etype = e.__class__
-                    msg = "generated by a constant operation:  %s" % (
-                        name)
+                    msg = "generated by a constant operation:\n\t%s%r" % (
+                        name, tuple(args))
                     raise OperationThatShouldNotBePropagatedError(
                         self.wrap(etype), self.wrap(msg))
                 else:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to