diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2003-09-22 20:13:42 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2003-09-22 20:13:42 +0000 |
commit | 9da574aae9749a321e07748cd0589e86925a66e4 (patch) | |
tree | 7c9f870c7cd1dacac5237b3b3d9068b91c5a13e1 /Examples/test-suite/director_exception.i | |
parent | 7ee01311b2ee9922289533e35bb38cc0593144c5 (diff) | |
download | swig-9da574aae9749a321e07748cd0589e86925a66e4.tar.gz |
__DIRECTOR__ renamed Swig::Director
SWIG_DIRECTOR_EXCEPTION renamed Swig::DirectorException (similarly for derived classes)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5138 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/director_exception.i')
-rw-r--r-- | Examples/test-suite/director_exception.i | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Examples/test-suite/director_exception.i b/Examples/test-suite/director_exception.i index c5f64d457..872e1f8b0 100644 --- a/Examples/test-suite/director_exception.i +++ b/Examples/test-suite/director_exception.i @@ -18,8 +18,10 @@ Foo *launder(Foo *f) { // in target languages that do not support directors. #ifndef SWIG_DIRECTORS -class SWIG_DIRECTOR_EXCEPTION {}; -class SWIG_DIRECTOR_METHOD_EXCEPTION: public SWIG_DIRECTOR_EXCEPTION {}; +namespace Swig { +class DirectorException {}; +class DirectorMethodException: public Swig::DirectorException {}; +} #ifndef SWIG_fail #define SWIG_fail #endif @@ -33,13 +35,13 @@ class SWIG_DIRECTOR_METHOD_EXCEPTION: public SWIG_DIRECTOR_EXCEPTION {}; %feature("director:except") { if ($error != NULL) { - throw SWIG_DIRECTOR_METHOD_EXCEPTION(); + throw Swig::DirectorMethodException(); } } %exception { try { $action } - catch (SWIG_DIRECTOR_EXCEPTION &e) { SWIG_fail; } + catch (Swig::DirectorException &e) { SWIG_fail; } } #endif @@ -47,12 +49,12 @@ class SWIG_DIRECTOR_METHOD_EXCEPTION: public SWIG_DIRECTOR_EXCEPTION {}; #ifdef SWIGRUBY %feature("director:except") { - throw SWIG_DIRECTOR_METHOD_EXCEPTION($error); + throw Swig::DirectorMethodException($error); } %exception { try { $action } - catch (SWIG_DIRECTOR_EXCEPTION &e) { rb_exc_raise(e.getError()); } + catch (Swig::DirectorException &e) { rb_exc_raise(e.getError()); } } #endif |