]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
CatchClause: use context when available to avoid report static access
authorDaniel Espinosa <esodan@gmail.com>
Sun, 2 Jan 2022 23:37:29 +0000 (17:37 -0600)
committerDaniel Espinosa <esodan@gmail.com>
Mon, 3 Jan 2022 23:51:33 +0000 (17:51 -0600)
vala/valacatchclause.vala

index 085d2c49bf56b03228597759e6be22029a9121d6..14df99cfe0e72ccc313a48bb5f3ae293f5ac53c9 100644 (file)
@@ -112,14 +112,14 @@ public class Vala.CatchClause : CodeNode {
                checked = true;
 
                if (context.profile == Profile.POSIX) {
-                       Report.error (source_reference, "`catch' is not supported in POSIX profile");
+                       context.report.log_error (source_reference, "`catch' is not supported in POSIX profile");
                        error = true;
                        return false;
                }
 
                if (error_type != null) {
                        if (!(error_type is ErrorType)) {
-                               Report.error (source_reference, "clause must catch a valid error type, found `%s' instead", error_type.to_string ());
+                               context.report.log_error (source_reference, "clause must catch a valid error type, found `%s' instead", error_type.to_string ());
                                error = true;
                        }