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:
Logan Johnson 2003-06-03 17:54:53 +00:00
commit 997070860e
2 changed files with 14 additions and 12 deletions

View file

@ -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