From: debutant <mic...@ho...> - 2011-11-09 09:47:52
|
It seems that I can do something like what follows in the .i file: class MyExceptionClass{ ... }; %catches(MyExceptionClass); return_type foo(); ... all the other methods ... I like swig .... debutant wrote: > > > hello, > > I have a c++ method, foo(), that I wrappe to python. > This method calls other c++ methods and some of them > can throw an exception. These other c++ methods are not wrapped. > > To catch the exception in python I could declare the foo > fontion as: > > return_type foo() throw(MyExceptionClass) > > But what can I do if I have no way to make modifications > in the c++ files , ie add the throw thing in the fonction declaration or > if I had to do that for 1000 fonctions > > Thanks for any help. > Michel > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > > -- View this message in context: http://old.nabble.com/catching-exceptions-tp32809507p32809692.html Sent from the swig-user mailing list archive at Nabble.com. |