mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Combined the myriad ScannerExceptions and ParserExceptions to a single ParserException class that has a message and a line/column position in the file where the error occurred.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace YAML
|
||||
void Scanner::SimpleKey::Invalidate()
|
||||
{
|
||||
if(required)
|
||||
throw RequiredSimpleKeyNotFound();
|
||||
throw ParserException(line, column, "required simple key not found");
|
||||
|
||||
if(pMapStart)
|
||||
pMapStart->status = TS_INVALID;
|
||||
@@ -44,7 +44,7 @@ namespace YAML
|
||||
// key.required = true; // TODO: is this correct?
|
||||
|
||||
// then add the (now unverified) key
|
||||
key.pKey = new Token(TT_KEY);
|
||||
key.pKey = new Token(TT_KEY, INPUT.line, INPUT.column);
|
||||
key.pKey->status = TS_UNVERIFIED;
|
||||
m_tokens.push(key.pKey);
|
||||
|
||||
|
Reference in New Issue
Block a user