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
|
|
@ -3992,7 +3992,7 @@ namespace Swig {
|
|||
|
||||
// Reconstruct and raise/throw the Java Exception that caused the DirectorException
|
||||
// Note that any error in the JNI exception handling results in a Java RuntimeException
|
||||
void raiseJavaException(JNIEnv *jenv) const;
|
||||
void throwException(JNIEnv *jenv) const;
|
||||
|
||||
// Create and throw the DirectorException
|
||||
static void raise(JNIEnv *jenv, jthrowable throwable) {
|
||||
|
|
@ -4295,7 +4295,7 @@ SWIGEXPORT void JNICALL Java_exampleJNI_MyClass_1call_1dirmethod(JNIEnv *jenv, j
|
|||
return ;
|
||||
|
||||
} catch(Swig::DirectorException &_e) {
|
||||
(&_e)->raiseJavaException(jenv);
|
||||
(&_e)->throwException(jenv);
|
||||
return ;
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue