From 41235831591d9779c333869b640202880e6dc576 Mon Sep 17 00:00:00 2001 From: Jesse Beder Date: Tue, 22 May 2012 16:56:10 -0500 Subject: [PATCH] Fixed end seq/map error msg --- src/emitterstate.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/emitterstate.cpp b/src/emitterstate.cpp index 9642179..4e1ae64 100644 --- a/src/emitterstate.cpp +++ b/src/emitterstate.cpp @@ -155,8 +155,12 @@ namespace YAML void EmitterState::EndedGroup(GroupType::value type) { - if(m_groups.empty()) - return SetError(ErrorMsg::UNMATCHED_GROUP_TAG); + if(m_groups.empty()) { + if(type == GroupType::Seq) + return SetError(ErrorMsg::UNEXPECTED_END_SEQ); + else + return SetError(ErrorMsg::UNEXPECTED_END_MAP); + } // get rid of the current group {