From: tarnschaf <ta...@gm...> - 2009-01-18 16:25:37
|
Hello, I implemented a class in Python which extends a virtual C++ class. (Actually a class only consisting of callbacks). With the director option it works that c++ calls are forwarded to my Python implementation. Now to the problem: I don't know how to handle errors in python. I am not talking about exceptions, but rather things like using classes that were not imported before. Usually python outputs something like: NameError: name 'NotImported' is not defined But if this occurs inside the director class (called from c++) the program, an AppCrash occurs and I don't know how to avoid this. def callbackMethod(self, data): h = NotImported() Is a NameError in Python an exception that can be catched? The Python program developed would otherwise become very hard to debug.. -- View this message in context: http://www.nabble.com/Uncatched-Crash-in-Python-Class-with-Directors-tp21529645p21529645.html Sent from the swig-user mailing list archive at Nabble.com. |