Code calling scanPlain() assumes scanPlain() writes exception into errorData_.

This commit is contained in:
Ferdinand Majerech 2014-07-23 18:28:57 +02:00
parent d4a7b066d0
commit 36e7954756

View file

@ -701,9 +701,14 @@ final class Scanner
//No simple keys after plain scalars. But note that scanPlain() will //No simple keys after plain scalars. But note that scanPlain() will
//change this flag if the scan is finished at the beginning of the line. //change this flag if the scan is finished at the beginning of the line.
allowSimpleKey_ = false; allowSimpleKey_ = false;
const plain = scanPlain();
if(error_)
{
error_ = false;
throw new Error(errorData_);
}
//Scan and add SCALAR. May change allowSimpleKey_ //Scan and add SCALAR. May change allowSimpleKey_
tokens_.push(scanPlain()); tokens_.push(plain);
} }