Commits

Antonio Cuni committed a2e7efb

argh, really check for *all* subclasses of Exception

Comments (0)

Files changed (1)

pypy/translator/cli/class_.py

         self.ilasm.end_function()
 
     def _toString(self):
-        if self.get_base_class() == '[mscorlib]System.Exception':
+        if ootype.isSubclass(self.INSTANCE, self.db.genoo.EXCEPTION):
             return # don't override the default ToString, which prints a traceback
         self.ilasm.begin_function('ToString', [], 'string', False, 'virtual', 'instance', 'default')
         self.ilasm.opcode('ldarg.0')