Commits

Philip Jenvey committed 9e265c6

update the exception message

Comments (0)

Files changed (2)

pypy/interpreter/error.py

         w_type = space.exception_getclass(w_inst)
         if not space.exception_is_valid_class_w(w_type):
             typename = w_type.getname(space)
-            msg = ("exceptions must be old-style classes or derived "
-                   "from BaseException, not %s")
+            msg = ("exceptions must be classes or instances deriving from "
+                   "BaseException, not %s")
             raise operationerrfmt(space.w_TypeError, msg, typename)
         return w_type
 

pypy/interpreter/test/test_interpreter.py

                 raise 1
             ''', 'f', [])
         assert "TypeError:" in x
-        assert ("exceptions must be old-style classes "
-                "or derived from BaseException") in x
+        assert ("exceptions must be classes or instances deriving from "
+                "BaseException, not ") in x
 
     def test_except2(self):
         x = self.codetest('''