Replace DirectorException::raiseJavaException with DirectorException::throwException
This is part of a plan to provide a common DirectorException api for throwing the target language exception raised during a director method call.
This commit is contained in:
parent
34712c0108
commit
901f8357b0
5 changed files with 17 additions and 10 deletions
|
|
@ -132,9 +132,10 @@
|
|||
%}
|
||||
|
||||
%feature ("except",throws="Exception") MyNS::Bar::genericpong %{
|
||||
try { $action }
|
||||
catch (Swig::DirectorException & direxcp) {
|
||||
direxcp.raiseJavaException(jenv); // jenv always available in JNI code
|
||||
try {
|
||||
$action
|
||||
} catch (Swig::DirectorException & direxcp) {
|
||||
direxcp.throwException(jenv); // jenv always available in JNI code
|
||||
return $null;
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -139,9 +139,10 @@
|
|||
%}
|
||||
|
||||
%feature ("except",throws="Exception") MyNS::Bar::genericpong %{
|
||||
try { $action }
|
||||
catch (Swig::DirectorException & direxcp) {
|
||||
direxcp.raiseJavaException(jenv); // jenv always available in JNI code
|
||||
try {
|
||||
$action
|
||||
} catch (Swig::DirectorException & direxcp) {
|
||||
direxcp.throwException(jenv); // jenv always available in JNI code
|
||||
return $null;
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue