Fix for %%javaexception and directors so that all the appropriate throws clauses are generated
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11797 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bd84f7f794
commit
6dad327ed3
4 changed files with 32 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
|||
Version 1.3.41 (in progress)
|
||||
============================
|
||||
|
||||
2009-12-23: wsfulton
|
||||
Fix for %javaexception and directors so that all the appropriate throws clauses
|
||||
are generated. Problem reported by Peter Greenwood.
|
||||
|
||||
2009-12-20: wsfulton
|
||||
Add -debug-tmsearch option for debugging the typemap pattern matching rules.
|
||||
Documented in Typemaps.html.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ public class java_director_runme {
|
|||
System.gc();
|
||||
System.runFinalization();
|
||||
|
||||
// Give the finalizers a chance to run
|
||||
try {
|
||||
Thread.sleep(50);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
|
||||
/* Watch the Quux objects formerly in the QuuxContainer object
|
||||
get reaped */
|
||||
System.gc();
|
||||
|
|
@ -73,3 +79,14 @@ class java_director_MyQuux extends Quux {
|
|||
return "java_director_MyQuux:" + member();
|
||||
}
|
||||
}
|
||||
|
||||
class java_director_JavaExceptionTest extends JavaExceptionTest {
|
||||
public java_director_JavaExceptionTest() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void etest() throws Exception {
|
||||
super.etest();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,3 +122,11 @@ struct JObjectTest {
|
|||
|
||||
%}
|
||||
|
||||
%javaexception("Exception") etest "$action"
|
||||
%inline %{
|
||||
struct JavaExceptionTest {
|
||||
virtual ~JavaExceptionTest() {}
|
||||
virtual void etest() {}
|
||||
};
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -3724,6 +3724,9 @@ public:
|
|||
|
||||
String *upcall = NewStringf("self.%s(%s)", symname, imcall_args);
|
||||
|
||||
// Handle exception classes specified in the "except" feature's "throws" attribute
|
||||
addThrows(n, "feature:except", n);
|
||||
|
||||
if (!is_void) {
|
||||
Parm *tp = NewParmFromNode(returntype, empty_str, n);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue