simplify output via macro SWIG_ArgError
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8737 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8f8271a7fe
commit
863369cc41
2 changed files with 2 additions and 1 deletions
|
|
@ -131,6 +131,7 @@
|
|||
#define SWIG_OK (0)
|
||||
#define SWIG_ERROR (-1)
|
||||
#define SWIG_IsOK(r) (r >= 0)
|
||||
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
||||
|
||||
/* The CastRankLimit says how many bits are used for the cast rank */
|
||||
#define SWIG_CASTRANKLIMIT (1 << 8)
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#define %error_block(Block...) %block(Block)
|
||||
#define %default_code(code) ((code != SWIG_ERROR) ? code : SWIG_TypeError)
|
||||
#define %default_code(code) SWIG_ArgError(code)
|
||||
#define %argument_fail(code, type, name, argn) SWIG_exception_fail(%default_code(code), %argfail_fmt(type, name, argn))
|
||||
#define %argument_nullref(type, name, argn) SWIG_exception_fail(SWIG_ValueError, %argnullref_fmt(type, name, argn))
|
||||
#define %variable_fail(code, type, name) SWIG_exception_fail(%default_code(code), %varfail_fmt(type, name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue