File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const char* const ZERO_INDENT_IN_BLOCK =
6565const char * const CHAR_IN_BLOCK = " unexpected character in block scalar" ;
6666const char * const AMBIGUOUS_ANCHOR =
6767 " cannot assign the same alias to multiple nodes" ;
68- const char * const UNKNOWN_ANCHOR = " the referenced anchor is not defined" ;
68+ const char * const UNKNOWN_ANCHOR = " the referenced anchor is not defined: " ;
6969
7070const char * const INVALID_NODE =
7171 " invalid node; this may result from using a map iterator as a sequence "
Original file line number Diff line number Diff line change @@ -424,8 +424,11 @@ anchor_t SingleDocParser::RegisterAnchor(const std::string& name) {
424424anchor_t SingleDocParser::LookupAnchor (const Mark& mark,
425425 const std::string& name) const {
426426 auto it = m_anchors.find (name);
427- if (it == m_anchors.end ())
428- throw ParserException (mark, ErrorMsg::UNKNOWN_ANCHOR);
427+ if (it == m_anchors.end ()) {
428+ std::stringstream ss;
429+ ss << ErrorMsg::UNKNOWN_ANCHOR << name;
430+ throw ParserException (mark, ss.str ());
431+ }
429432
430433 return it->second ;
431434}
You can’t perform that action at this time.
0 commit comments