Replace all exit() with SWIG_exit()

For consistent cleanup on error
This commit is contained in:
William S Fulton 2019-07-29 19:35:54 +01:00
commit 2cf075558c
11 changed files with 24 additions and 24 deletions

View file

@ -1779,7 +1779,7 @@ declaration : swig_directive { $$ = $1; }
} else {
Swig_error(cparse_file, cparse_line, "Syntax error in input(1).\n");
}
exit(1);
SWIG_exit(EXIT_FAILURE);
}
/* Out of class constructor/destructor declarations */
| c_constructor_decl {
@ -3359,7 +3359,7 @@ c_decl_tail : SEMI {
} else {
Swig_error(cparse_file, cparse_line, "Syntax error - possibly a missing semicolon.\n");
}
exit(1);
SWIG_exit(EXIT_FAILURE);
}
;
@ -3649,7 +3649,7 @@ c_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end {
}
if (err) {
Swig_error(cparse_file,cparse_line,"Syntax error in input(2).\n");
exit(1);
SWIG_exit(EXIT_FAILURE);
}
}
;
@ -4632,7 +4632,7 @@ cpp_members : cpp_member cpp_members {
int start_line = cparse_line;
skip_decl();
Swig_error(cparse_file,start_line,"Syntax error in input(3).\n");
exit(1);
SWIG_exit(EXIT_FAILURE);
} cpp_members {
$$ = $3;
}