File tree Expand file tree Collapse file tree 4 files changed +19
-18
lines changed
Expand file tree Collapse file tree 4 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,15 @@ int main (int argc , char **argv)
1111
1212 xodr _odrive;
1313 _odrive.load (filename);
14- _odrive.parse ();
14+
15+ try {
16+ _odrive.parse ();
17+ std::cout << " OpenDRIVE parse successfully " << _odrive.m_OpenDRIVE << std::endl;
18+ }
19+ catch (std::exception &e)
20+ {
21+ std::cout << " ERROR :Exception .. " << e.what () << std::endl;
22+ }
1523
1624 _odrive.save (" xodr_save.xml" );
1725
Original file line number Diff line number Diff line change @@ -11,7 +11,14 @@ int main (int argc , char **argv)
1111
1212 xosc _osc;
1313 _osc.load (filename);
14- _osc.parse ();
14+ try {
15+ _osc.parse ();
16+ std::cout << " OpenSCENARIO parse successfully " << _osc.m_OpenSCENARIO << std::endl;
17+ }
18+ catch (std::exception &e)
19+ {
20+ std::cout << " ERROR :Exception .. " << e.what () << std::endl;
21+ }
1522
1623 _osc.save (" xosc_save.xml" );
1724
Original file line number Diff line number Diff line change @@ -2011,14 +2011,7 @@ void xodr::load(std::string xodrfilename )
20112011}
20122012void xodr::parse ()
20132013{
2014- try {
2015- m_OpenDRIVE = std::make_shared<OpenDRIVE>(m_root.child (" OpenDRIVE" ));
2016- std::cout << " OpenDRIVE parse successfully " << m_OpenDRIVE<< std::endl;
2017- }
2018- catch (std::exception &e)
2019- {
2020- std::cout << " ERROR :Exception .. " << e.what () << std::endl;
2021- }
2014+ m_OpenDRIVE = std::make_shared<OpenDRIVE>(m_root.child (" OpenDRIVE" ));
20222015}
20232016void xodr::save (std::string filename)
20242017{
Original file line number Diff line number Diff line change @@ -3428,14 +3428,7 @@ void xosc::load(std::string xoscfilename )
34283428}
34293429void xosc::parse ()
34303430{
3431- try {
3432- m_OpenSCENARIO = std::make_shared<OpenSCENARIO>(m_root.child (" OpenSCENARIO" ));
3433- std::cout << " OpenSCENARIO parse successfully " << m_OpenSCENARIO<< std::endl;
3434- }
3435- catch (std::exception &e)
3436- {
3437- std::cout << " ERROR :Exception .. " << e.what () << std::endl;
3438- }
3431+ m_OpenSCENARIO = std::make_shared<OpenSCENARIO>(m_root.child (" OpenSCENARIO" ));
34393432}
34403433void xosc::save (std::string filename)
34413434{
You can’t perform that action at this time.
0 commit comments