csharp : noexcept method can't raise Swig::DirectorPureVirtualException
This commit is contained in:
parent
e13eaaae21
commit
9dcf10138e
1 changed files with 7 additions and 1 deletions
|
|
@ -403,6 +403,7 @@ public:
|
||||||
|
|
||||||
if (directorsEnabled()) {
|
if (directorsEnabled()) {
|
||||||
Printf(f_runtime, "#define SWIG_DIRECTORS\n");
|
Printf(f_runtime, "#define SWIG_DIRECTORS\n");
|
||||||
|
Printf(f_runtime, "#include <assert.h>\n");
|
||||||
|
|
||||||
/* Emit initial director header and director code: */
|
/* Emit initial director header and director code: */
|
||||||
Swig_banner(f_directors_h);
|
Swig_banner(f_directors_h);
|
||||||
|
|
@ -3935,7 +3936,12 @@ public:
|
||||||
}
|
}
|
||||||
Delete(super_call);
|
Delete(super_call);
|
||||||
} else {
|
} else {
|
||||||
Printf(w->code, " throw Swig::DirectorPureVirtualException(\"%s::%s\");\n", SwigType_namestr(c_classname), SwigType_namestr(name));
|
if (Getattr(n, "noexcept")) {
|
||||||
|
Printf(w->code, " //can't throw exception here\n");
|
||||||
|
Printf(w->code, " assert(0 && \"swig DirectorPureVirtualException %s::%s\");", SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||||
|
} else {
|
||||||
|
Printf(w->code, " throw Swig::DirectorPureVirtualException(\"%s::%s\");\n", SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ignored_method)
|
if (!ignored_method)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue