diff options
Diffstat (limited to 'src/core/parser/stack')
-rw-r--r-- | src/core/parser/stack/DocumentHandler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index 486ce81..c239583 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -302,6 +302,16 @@ bool DocumentChildHandler::startAnnotation(Variant::mapType &args) // pop the implicit element. scope().pop(logger()); continue; + } else { + logger().error( + "Cannot start or end annotation within the primitive field \"" + + parent->getDescriptor() + ->getFieldDescriptors()[fieldIdx] + ->getNameOrDefaultName() + + "\" of descriptor \"" + parent->getDescriptor()->getName() + + "\".", + location()); + return false; } } |