Added line/column data for nodes so they can give better invalid scalar exceptions.
This commit is contained in:
parent
14cdec770c
commit
9969ff512e
@ -16,8 +16,8 @@ void run()
|
||||
doc[i] >> value;
|
||||
std::cout << (value ? "true" : "false") << "\n";
|
||||
}
|
||||
} catch(YAML::Exception&) {
|
||||
std::cout << "Error parsing the yaml!\n";
|
||||
} catch(YAML::Exception& e) {
|
||||
std::cout << "Error at line " << e.line+1 << ", col " << e.column+1 << ": " << e.msg << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user