rename %throws to %catchs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8351 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b044703d0d
commit
e676d2f8bd
6 changed files with 62 additions and 35 deletions
|
|
@ -465,16 +465,19 @@ class Allocate : public Dispatcher {
|
|||
}
|
||||
|
||||
void mark_exception_classes(Node *n) {
|
||||
ParmList *throws = Getattr(n,"throws");
|
||||
if (!throws) {
|
||||
String *sthrows = Getattr(n,"feature:throws");
|
||||
if (sthrows) {
|
||||
throws = Swig_cparse_parms(sthrows);
|
||||
if (throws) {
|
||||
Setattr(n,"throws",throws);
|
||||
}
|
||||
ParmList *throws = 0;
|
||||
/* the "catchs" feature take precedence over the original throw list */
|
||||
String *sthrows = Getattr(n,"feature:catchs");
|
||||
if (sthrows) {
|
||||
throws = Swig_cparse_parms(sthrows);
|
||||
if (throws) {
|
||||
Setattr(n,"throws",throws);
|
||||
Delete(throws);
|
||||
}
|
||||
}
|
||||
if (!throws) {
|
||||
throws = Getattr(n,"throws");
|
||||
}
|
||||
if (throws) {
|
||||
ParmList *p = throws;
|
||||
while(p) {
|
||||
|
|
|
|||
|
|
@ -437,8 +437,10 @@ void emit_action(Node *n, Wrapper *f) {
|
|||
SwigType *etr = SwigType_typedef_resolve_all(et);
|
||||
if (SwigType_isreference(etr) || SwigType_ispointer(etr) || SwigType_isarray(etr)) {
|
||||
Printf(eaction,"catch(%s) {", SwigType_str(et, "_e"));
|
||||
} else {
|
||||
Printf(eaction,"catch(%s) {", SwigType_str(et, "&_e"));
|
||||
} else if (SwigType_isvarargs(etr)) {
|
||||
Printf(eaction,"catch(...) {");
|
||||
} else {
|
||||
Printf(eaction,"catch(%s) {", SwigType_str(et, "&_e"));
|
||||
}
|
||||
Printv(eaction,em,"\n",NIL);
|
||||
Printf(eaction,"}\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue