From b5cdca0331117ad3834b61eadd94ab3fcb6d2fba Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Sun, 1 Mar 2015 21:08:49 +0100 Subject: improved error messages for empty field names. --- src/core/parser/stack/DocumentHandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/parser/stack/DocumentHandler.cpp') diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index 2144c34..a307f71 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -235,7 +235,7 @@ bool DocumentChildHandler::start(Variant::mapType &args) throw LoggableException( std::string("An instance of \"") + strct->getName() + "\" is not allowed as child of field \"" + - field->getName() + "\" of descriptor \"" + + field->getNameOrDefaultName() + "\" of descriptor \"" + parent->getDescriptor()->getName() + "\"", location()); } @@ -245,8 +245,6 @@ bool DocumentChildHandler::start(Variant::mapType &args) parent->getDescriptor()->getFieldDescriptorIndex(); } // create the entity for the new element at last. - // TODO: REMOVE - strct_name = strct->getName(); entity = parent->createChildStructuredEntity(strct, lastFieldIdx, args, nameAttr); } -- cgit v1.2.3