[vala/0.54] 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.54] gtkmodule: Improve error message for invalid signal element in ui-file
- Date: Sun, 14 Nov 2021 09:39:39 +0000 (UTC)
commit 82676bd3822bbc749fb06688826ae661ab5b5710
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 8b2e88da1..01e60535f 100644
--- a/codegen/valagtkmodule.vala
+++ b/codegen/valagtkmodule.vala
@@ -187,7 +187,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'", ui_file);
+ if (signal_name != null) {
+ Report.error (node.source_reference, "Invalid signal
`%s' without handler in ui file `%s'", signal_name, ui_file);
+ } else if (handler_name != null) {
+ Report.error (node.source_reference, "Invalid signal
without name in ui file `%s'", ui_file);
+ } else {
+ Report.error (node.source_reference, "Invalid signal
without name and handler in ui file `%s'", ui_file);
+ }
current_token = reader.read_token (null, null);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]