juanmanzanero / fastest-lap

Fastest-lap is a vehicle dynamics simulator. It can be used to understand vehicle dynamics, to learn about driving techniques, to design car prototypes, or just for fun!
MIT License
575 stars 43 forks source link

Enhance exception verbosity to Xml_document and Xml_element #28

Closed juanmanzanero closed 2 years ago

juanmanzanero commented 2 years ago

https://github.com/juanmanzanero/lion-cpp/issues/4

Whenever Xml_document or Xml_element throw an exception, include the element/document in the exception message

if ( something_is_wrong ) {
    std::ostringstream s_out;
    s_out << "[ERROR] Error message description"  << std::endl;
    doc.print(s_out);
    throw lion_exception(s_out.str());
}