Commits

Anonymous committed 934d725

big error message for trying to catch an OSError in rpython tests

Comments (0)

Files changed (2)

pypy/rpython/llinterp.py

             etype = frame.op_direct_call(exdata.fn_type_of_exc_inst, evalue)
             if etype == klass:
                 return cls
-        raise ValueError, "couldn't match exception"
+        raise ValueError, "couldn't match exception, maybe it has RPython attributes like OSError?"
 
     def get_transformed_exc_data(self, graph):
         if hasattr(graph, 'exceptiontransformed'):

pypy/rpython/test/test_llinterp.py

     info = py.test.raises(LLException, "interp.eval_graph(graph, values)")
     try:
         got = interp.find_exception(info.value)
-    except ValueError:
-        got = None
+    except ValueError as message:
+        got = 'None %r'%message
     assert got is exc, "wrong exception type, expected %r got %r"%(exc, got)
 
 #__________________________________________________________________