Author: Armin Rigo <[email protected]>
Branch:
Changeset: r97351:ee34ae9a1ae5
Date: 2019-08-31 16:18 +0200
http://bitbucket.org/pypy/pypy/changeset/ee34ae9a1ae5/
Log: improve error message
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -570,8 +570,8 @@
# the simple case
if issubclass(check_class, (NotImplementedError, AssertionError)):
raise FlowingError(
- "Catching %s is not valid in RPython" %
- check_class.__name__)
+ "Catching NotImplementedError, AssertionError, or a "
+ "subclass is not valid in RPython (%r)" % (check_class,))
return self.guessbool(op.issubtype(w_exc_type,
w_check_class).eval(self))
# special case for StackOverflow (see rlib/rstackovf.py)
if check_class == rstackovf.StackOverflow:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit