Fix bunch of warnings from code analysis (#321)

Warnings produced complain that re-throw did not properly capture stack trace.
Given that these rethrow just to please compiler, I think it is better fix that.
This commit is contained in:
Andrii Kurdiumov 2022-01-27 02:17:28 +06:00 committed by GitHub
parent 4710fa1d06
commit 50b87a49d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -246,7 +246,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t\t\t\tGLib.ExceptionManager.RaiseUnhandledException (e, " + (fatal ? "true" : "false") + ");");
if (fatal) {
sw.WriteLine ("\t\t\t\t// NOTREACHED: Above call does not return.");
sw.WriteLine ("\t\t\t\tthrow e;");
sw.WriteLine ("\t\t\t\tthrow;");
} else if (retval.MarshalType == "bool") {
sw.WriteLine ("\t\t\t\treturn false;");
}

View file

@ -117,7 +117,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t\t\t\tGLib.ExceptionManager.RaiseUnhandledException (e, " + (fatal ? "true" : "false") + ");");
if (fatal) {
sw.WriteLine ("\t\t\t\t// NOTREACHED: above call does not return.");
sw.WriteLine ("\t\t\t\tthrow e;");
sw.WriteLine ("\t\t\t\tthrow;");
}
if (call.HasDisposeParam) {