Mark Gossage patch 1295168

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-20 19:35:23 +00:00
commit 39119b2d07
7 changed files with 61 additions and 34 deletions

View file

@ -204,7 +204,7 @@ SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
SWIGINTERN void SWIG_exception_(int code, const char *msg) {
char msg_buf[OCAML_MSG_BUF_LEN];
sprintf( msg_buf, "Exception(%d): %s\n", code, msg );
failwith( msg_buf );
failwith( msg_buf );
}
#define SWIG_exception(a,b) SWIG_exception_((a),(b))
%}
@ -318,6 +318,15 @@ SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
%enddef
#endif // SWIGCSHARP
#ifdef SWIGLUA
%{
#define SWIG_exception(a,b)\
{ lua_pushfstring(L,"%s:%s",#a,b);SWIG_fail; }
%}
#endif // SWIGLUA
#ifdef __cplusplus
/*
You can use the SWIG_CATCH_STDEXCEPT macro with the %exception
@ -330,11 +339,11 @@ SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
catch (my_except& e) {
...
}
SWIG_CATCH_STDEXCEPT // catch std::exception
SWIG_CATCH_STDEXCEPT // catch std::exception
catch (...) {
SWIG_exception(SWIG_UnknownError, "Unknown exception");
}
}
}
*/
%{
#include <stdexcept>