Contract assert macro added

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5337 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-11-18 22:31:50 +00:00
commit 329bd4f1c4

View file

@ -88,4 +88,8 @@ void SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const c
}
%insert(runtime) %{
#endif
/* Contract support */
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
%}