[gxml] Parser: improve error on collection initialization
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Parser: improve error on collection initialization
- Date: Tue, 9 Jul 2019 19:26:33 +0000 (UTC)
commit 36750ef6ca7bfb4502ecd3c64b60497fa79060c5
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Jul 9 14:19:49 2019 -0500
Parser: improve error on collection initialization
gxml/Parser.vala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gxml/Parser.vala b/gxml/Parser.vala
index 409675f..3012e63 100644
--- a/gxml/Parser.vala
+++ b/gxml/Parser.vala
@@ -250,19 +250,19 @@ public interface GXml.Parser : GLib.Object {
if (col.items_type == GLib.Type.INVALID
|| !(col.items_type.is_a (typeof (GXml.Object)))) {
throw new DomError.INVALID_NODE_TYPE_ERROR
- (_("Invalid object type set to Collection"));
+ (_("Collection '%s' hasn't been constructed properly: items type propeerty was not set
at construction time or set to invalid type"), col.get_type ().name ());
}
if (col.items_name == "" || col.items_name == null) {
throw new DomError.INVALID_NODE_TYPE_ERROR
- (_("Invalid DomElement name for objects in Collection"));
+ (_("Collection '%s' hasn't been constructed properly: items' name property was not set
at construction time"), col.get_type ().name ());
}
if (col.element == null || !(col.element is GXml.Object)) {
throw new DomError.INVALID_NODE_TYPE_ERROR
- (_("Collection hasn't been constructed properly: element property was not set at
construction time"));
+ (_("Collection '%s' hasn't been constructed properly: element property was not set at
construction time"), col.get_type ().name ());
}
if (!(col.element is GXml.Object)) {
throw new DomError.INVALID_NODE_TYPE_ERROR
- (_("Invalid object's type '%s' it doesn't implemement GXml.Object interface: can't be
handled by the collection"), col.element.get_type ().name ());
+ (_("Invalid object of type '%s' doesn't implemement GXml.Object interface: can't be
handled by the collection"), col.element.get_type ().name ());
}
if (col.items_name.down () == current_node_name ().down ()) {
if (parent.owner_document == null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]