From: Peter G. <pet...@fa...> - 2009-12-23 15:34:21
|
Thanks William, I really wondered if I had missed a trick somewhere. Peter Greenwood wrote: > > Hi, > I have been happily using Swig to generate C# and Java on a clollection of > classes and need to make callbacks on one of them. How do get Swig to > generate a throws clause on SwigDirector_<Module>_<functionName> > signatures in the JNI file? > For example if I have the following interface: > > %module (directors="1") example > %{ > #include "example.h" > %} > %javaexception("Exception") f3 "$action" > %feature("director") A; > %include "example.h" > > And h file: > > namespace X > { > class A { > public: > virtual void f3()=0; > }; > }; > > I can see in the exampleJNI.java file: > > public final static native void A_f3(long jarg1, A jarg1_) throws > Exception; > > public static void SwigDirector_A_f3(A self) { > self.f3(); > } > > How do I get Swig to generate "throws Exception" clause as per: > public static void SwigDirector_A_f3(A self) throws Exception { > self.f3(); > } > > Thanks > -- View this message in context: http://old.nabble.com/How-do-I-generate-throws-clauses-on-Java-SwigDirector_*_*-functions-tp26628400p26903636.html Sent from the swig-user mailing list archive at Nabble.com. |