Author: Philip Jenvey <pjen...@underboss.org> Branch: stdlib-2.7.12 Changeset: r87644:d46eaca6250c Date: 2016-10-08 18:44 -0700 http://bitbucket.org/pypy/pypy/changeset/d46eaca6250c/
Log: more helpful failed repr/str messages expected by test_exceptions diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py --- a/pypy/interpreter/error.py +++ b/pypy/interpreter/error.py @@ -88,7 +88,8 @@ exc_value = space.str_w(space.str(w_value)) except OperationError: # oups, cannot __str__ the exception object - exc_value = "<oups, exception object itself cannot be str'd>" + exc_value = ("<exception %s() failed>" % + ("repr" if use_repr else "str")) if not exc_value: return exc_typename else: @@ -238,7 +239,7 @@ try: objrepr = space.str_w(space.repr(w_object)) except OperationError: - objrepr = '?' + objrepr = "<object repr() failed>" # try: if with_traceback: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit