summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2023-02-18 21:32:52 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2023-02-20 14:17:22 +0100
commitf85063c3267505a4716229d3b10650421e131ded (patch)
treebb0dda4c20a10431145b1fbbbe556b91139d7546
parente72449cca6fc267f3304c599d0cfc0dd4f1adcc1 (diff)
downloadvala-f85063c3267505a4716229d3b10650421e131ded.tar.gz
gtkmodule: Improve error messages
Be a bit more specific about some of the errors that valac can encounter when parsing a UI file. (for my use case specifically, it helped me to figure out I had a <property> tag without a name attribute in one of my UI files)
-rw-r--r--codegen/valagtkmodule.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala
index e129fcba0..69125ce57 100644
--- a/codegen/valagtkmodule.vala
+++ b/codegen/valagtkmodule.vala
@@ -294,7 +294,7 @@ public class Vala.GtkModule : GSignalModule {
} else if (current_object != null && current_token == MarkupTokenType.START_ELEMENT && (current_name == "property" || current_name == "binding")) {
var property_name = reader.get_attribute ("name");
if (property_name == null) {
- Report.error (node.source_reference, "Invalid binding in ui file `%s'", ui_file);
+ Report.error (node.source_reference, "Invalid %s without name in ui file `%s'", current_name, ui_file);
current_token = reader.read_token (null, null);
continue;
}
@@ -318,7 +318,7 @@ public class Vala.GtkModule : GSignalModule {
if (current_property != null) {
if (handler_name == null) {
- Report.error (node.source_reference, "Invalid closure in ui file `%s'", ui_file);
+ Report.error (node.source_reference, "Invalid %s without function in ui file `%s'", current_name, ui_file);
current_token = reader.read_token (null, null);
continue;
}