Cosmetic whitespace improvement in generated code from throws typemaps.

This commit is contained in:
William S Fulton 2017-11-24 18:17:39 +00:00
commit eef3e7aa8f

View file

@ -498,14 +498,14 @@ String *emit_action(Node *n) {
Printf(eaction, " catch(%s) {", SwigType_str(et, "&_e")); Printf(eaction, " catch(%s) {", SwigType_str(et, "&_e"));
} }
Printv(eaction, em, "\n", NIL); Printv(eaction, em, "\n", NIL);
Printf(eaction, "}\n"); Printf(eaction, "}");
} else { } else {
Swig_warning(WARN_TYPEMAP_THROW, Getfile(n), Getline(n), "No 'throws' typemap defined for exception type '%s'\n", SwigType_str(Getattr(ep, "type"), 0)); Swig_warning(WARN_TYPEMAP_THROW, Getfile(n), Getline(n), "No 'throws' typemap defined for exception type '%s'\n", SwigType_str(Getattr(ep, "type"), 0));
unknown_catch = 1; unknown_catch = 1;
} }
} }
if (unknown_catch && !has_varargs) { if (unknown_catch && !has_varargs) {
Printf(eaction, "catch(...) { throw; }\n"); Printf(eaction, " catch(...) {\nthrow;\n}");
} }
} }