diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-15 13:06:25 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:27 +0200 |
commit | 2f394e84881ba663f1747a66891f994a54e5fdd4 (patch) | |
tree | c6cf04c6616581f474236c2756785c5f9808a02f /src | |
parent | 45a0c86e35fd693cdfb40d8d3bcb251fe4b786b0 (diff) |
Fix crash when an undefined annotation is met in the input
Diffstat (limited to 'src')
-rw-r--r-- | src/core/parser/stack/Stack.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/parser/stack/Stack.cpp b/src/core/parser/stack/Stack.cpp index 436d3a5..90735df 100644 --- a/src/core/parser/stack/Stack.cpp +++ b/src/core/parser/stack/Stack.cpp @@ -869,8 +869,15 @@ void StackImpl::handleAnnotationStartEnd(const Variant &name, // Call the startAnnotation method of the newly created handler, store the // valid flag HandlerInfo &info = currentInfo(); - info.valid = handler->startAnnotation(args); + info.valid = false; + try { + info.valid = handler->startAnnotation(args); + } catch (LoggableException ex) { + logger().log(ex); + } info.range = range; + + // End the handler directly if this is an annotation end if (type == HandlerType::ANNOTATION_END) { endCurrentHandler(); } |