[vala/0.48] gtkmodule: Improve error message for invalid signal element in ui-file
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] gtkmodule: Improve error message for invalid signal element in ui-file
- Date: Sun, 14 Nov 2021 12:15:29 +0000 (UTC)
commit 335b7719dee31cbf41de7deec87af4df2d1d5c8a
Author: Yotam Nachum <me yotam net>
Date: Sat Nov 6 14:33:07 2021 +0200
gtkmodule: Improve error message for invalid signal element in ui-file
codegen/valagtkmodule.vala | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala
index 2f3431653..a8b0d31c0 100644
--- a/codegen/valagtkmodule.vala
+++ b/codegen/valagtkmodule.vala
@@ -184,7 +184,13 @@ public class Vala.GtkModule : GSignalModule {
if (current_class != null) {
if (signal_name == null || handler_name == null) {
- Report.error (node.source_reference, "Invalid signal in ui
file `%s'".printf (ui_file));
+ if (signal_name != null) {
+ Report.error (node.source_reference, "Invalid signal
`%s' without handler in ui file `%s'".printf (signal_name, ui_file));
+ } else if (handler_name != null) {
+ Report.error (node.source_reference, "Invalid signal
without name in ui file `%s'".printf (ui_file));
+ } else {
+ Report.error (node.source_reference, "Invalid signal
without name and handler in ui file `%s'".printf (ui_file));
+ }
current_token = reader.read_token (null, null);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]