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

This commit is contained in:
jbeder
2008-11-18 04:19:50 +00:00
parent d1ef1e8ef1
commit 09d2858dc0

View File

@@ -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";
} }
} }