From a8f7d6ba25709936dee019bdb4ebdbc93ecb9cb4 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 31 Oct 2005 09:45:21 +0000 Subject: [PATCH] use shorter SWIG_exception for errors git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7760 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/typemaps/swigtypemaps.swg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SWIG/Lib/typemaps/swigtypemaps.swg b/SWIG/Lib/typemaps/swigtypemaps.swg index 88e25ca43..613f688ff 100644 --- a/SWIG/Lib/typemaps/swigtypemaps.swg +++ b/SWIG/Lib/typemaps/swigtypemaps.swg @@ -131,10 +131,10 @@ * ----------------------------------------------------------------------------- */ #define %error_block(Block...) %block(Block) -#define %argument_fail(code, type, argn) %error_block(SWIG_Error(code, %argfail_fmt(type, argn)); SWIG_fail) -#define %argument_nullref(type, argn) %error_block(SWIG_Error(SWIG_ValueError, %argnullref_fmt(type, argn)); SWIG_fail) -#define %variable_fail(code, type, name) %error_block(SWIG_Error(code, %varfail_fmt(type, name)); SWIG_fail) -#define %variable_nullref(type, name) %error_block(SWIG_Error(SWIG_ValueError, %varnullref_fmt(type, name)); SWIG_fail) +#define %argument_fail(code, type, argn) SWIG_exception(code, %argfail_fmt(type, argn)) +#define %argument_nullref(type, argn) SWIG_exception(SWIG_ValueError, %argnullref_fmt(type, argn)) +#define %variable_fail(code, type, name) SWIG_exception(code, %varfail_fmt(type, name)) +#define %variable_nullref(type, name) SWIG_exception(SWIG_ValueError, %varnullref_fmt(type, name)) #if defined(SWIG_DIRECTOR_TYPEMAPS) #define %dirout_fail(code, type) SWIG_DirOutFail(code, %outfail_fmt(type))