Commit 9969ff51 authored by Jesse Beder's avatar Jesse Beder
Browse files

Added line/column data for nodes so they can give better invalid scalar exceptions.

parent 14cdec77
...@@ -16,8 +16,8 @@ void run() ...@@ -16,8 +16,8 @@ void run()
doc[i] >> value; doc[i] >> value;
std::cout << (value ? "true" : "false") << "\n"; std::cout << (value ? "true" : "false") << "\n";
} }
} catch(YAML::Exception&) { } catch(YAML::Exception& e) {
std::cout << "Error parsing the yaml!\n"; std::cout << "Error at line " << e.line+1 << ", col " << e.column+1 << ": " << e.msg << "\n";
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment