Modified how the SWIG_DIRECTOR_EXCEPTION class (and its subclasses) are
implemented for the Ruby module. Now the SWIG_DIRECTOR_EXCEPTION object stores a reference to the Ruby exception instance. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f0990f47e5
commit
997070860e
2 changed files with 14 additions and 12 deletions
|
|
@ -49,12 +49,12 @@ class SWIG_DIRECTOR_METHOD_EXCEPTION: public SWIG_DIRECTOR_EXCEPTION {};
|
|||
#ifdef SWIGRUBY
|
||||
|
||||
%feature("director:except") {
|
||||
throw SWIG_DIRECTOR_METHOD_EXCEPTION();
|
||||
throw SWIG_DIRECTOR_METHOD_EXCEPTION($error);
|
||||
}
|
||||
|
||||
%exception {
|
||||
try { $action }
|
||||
catch (SWIG_DIRECTOR_EXCEPTION &e) { rb_raise(e.getType(), e.getMessage()); }
|
||||
catch (SWIG_DIRECTOR_EXCEPTION &e) { rb_exc_raise(e.getError()); }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue