summaryrefslogtreecommitdiff
path: root/Lib/exception.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2005-09-20 19:35:23 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2005-09-20 19:35:23 +0000
commitafda89dc49d9e1cd87a20926d67cd8422dfb82a5 (patch)
tree9b30d09287fbbfd153a2423e161aa7572e512421 /Lib/exception.i
parent92c5d2a22bb51d6046290ed586eb6a4d7d04d1d4 (diff)
downloadswig-afda89dc49d9e1cd87a20926d67cd8422dfb82a5.tar.gz
Mark Gossage patch 1295168
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/exception.i')
-rw-r--r--Lib/exception.i15
1 files changed, 12 insertions, 3 deletions
diff --git a/Lib/exception.i b/Lib/exception.i
index 15c93b599..5770e64d1 100644
--- a/Lib/exception.i
+++ b/Lib/exception.i
@@ -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>