Added std_string support. Renamed SWIG_exception to SWIG_exc to avoid name collision with macro in Lib/exception.i.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Maciej Drwal 2008-07-30 22:09:02 +00:00
commit dcec3c3fb0
6 changed files with 140 additions and 50 deletions

View file

@ -9,7 +9,7 @@ int main() {
Test_unknown(t);
}
SWIG_catch(SWIG_AnyException) {
printf("incomplete type: %s\n", SWIG_exception.msg);
printf("incomplete type: %s\n", SWIG_exc.msg);
}
SWIG_endtry;
@ -17,7 +17,7 @@ int main() {
Test_simple(t);
}
SWIG_catch(SWIG_AnyException) {
printf("%s\n", SWIG_exception.msg);
printf("%s\n", SWIG_exc.msg);
}
SWIG_endtry;
@ -25,7 +25,7 @@ int main() {
Test_message(t);
}
SWIG_catch(SWIG_AnyException) {
printf("%s\n", SWIG_exception.msg);
printf("%s\n", SWIG_exc.msg);
}
SWIG_endtry;
@ -33,7 +33,8 @@ int main() {
Test_hosed(t);
}
SWIG_catch(Exc) {
printf("%d %s\n", Exc_code_get(SWIG_exception.klass), Exc_msg_get(SWIG_exception.klass));
printf("%d %s\n", Exc_code_get(SWIG_exc.klass),
Exc_msg_get(SWIG_exc.klass));
}
int i;
@ -42,10 +43,11 @@ int main() {
Test_multi(t, i);
}
SWIG_catch(Exc) {
printf("%d %s\n", Exc_code_get(SWIG_exception.klass), Exc_msg_get(SWIG_exception.klass));
printf("%d %s\n", Exc_code_get(SWIG_exc.klass),
Exc_msg_get(SWIG_exc.klass));
}
SWIG_catch(SWIG_AnyException) {
printf("%s\n", SWIG_exception.msg);
printf("%s\n", SWIG_exc.msg);
}
SWIG_endtry;
}