mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Added line/column data for nodes so they can give better invalid scalar exceptions.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user