Javascript, Octave, R - Improve exceptions for %catches

and exception specifications for native types.

Now the raised exception contains the string value as the exception
message instead of just the C/C++ type of the exception.

R exceptions were completely swallowed beforehand
This commit is contained in:
William S Fulton 2022-09-17 16:06:44 +01:00
commit 00190c484f
8 changed files with 35 additions and 17 deletions

View file

@ -96,6 +96,11 @@ SWIGINTERN void SWIG_V8_Raise(const char *msg) {
SWIGV8_THROW_EXCEPTION(v8::Exception::Error(SWIGV8_STRING_NEW(msg)));
}
SWIGINTERN void SWIG_V8_Raise(SWIGV8_VALUE obj, const char *msg) {
SWIGV8_THROW_EXCEPTION(obj);
}
/*
Note: There are two contexts for handling errors.
A static V8ErrorHandler is used in not overloaded methods.