Correct checked exceptions specified in the throws typemap for javadirectorin and javadirectorout typemaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-05-14 22:09:08 +00:00
commit b18861a374

View file

@ -11,6 +11,14 @@
%feature("director") Base;
%feature("director") Derived;
// Test the throws attribute in these typemaps
%typemap(javadirectorout, throws="RuntimeException/*javadirectorout Base&*/") Base&
"$javaclassname.getCPtr($javacall)/* XYZ& typemap directorout*/"
%typemap(javadirectorin, throws="Throwable/*javadirectorin Base&*/") Base&
"new $javaclassname($jniinput, false)/*javadirectorin*/"
%typemap(out, throws="IllegalAccessException/*out Base&*/") Base& {
// XYZ& typemap out
}
%inline %{
template<class T> T maximum(const T a, const T b) { return a>b ? a : b; }
@ -42,6 +50,7 @@ public:
Base(Base *b) : mVectInt(0) {}
virtual ~Base() {}
virtual Base& m1(Base &b) { return b; }
virtual Base& m1out() { static Base b; return b; }
virtual Base* m2(Base *b) { return b; }
// virtual Base m3(Base b) { return b; }
vector<int> mVectInt;