[vala/1270-remove-static-codecontext-access: 28/44] CatchClause: use context when available to avoid report static access




commit c76b4264860cbf0564347b025527d95f6ba1358c
Author: Daniel Espinosa <esodan gmail com>
Date:   Sun Jan 2 17:37:29 2022 -0600

    CatchClause: use context when available to avoid report static access

 vala/valacatchclause.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valacatchclause.vala b/vala/valacatchclause.vala
index 085d2c49b..14df99cfe 100644
--- a/vala/valacatchclause.vala
+++ b/vala/valacatchclause.vala
@@ -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;
                        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]