uleroboticsgroup / yasmin

YASMIN (Yet Another State MachINe)
GNU General Public License v3.0
144 stars 28 forks source link

Made throw exceptions more understandable #24

Closed CihatAltiparmak closed 2 months ago

CihatAltiparmak commented 2 months ago

Hello,

This PR is for making throw exceptions more understandable by other users. With this changes, We can print throw exceptions at terminal in a cool way. Would you like to show which command exactly you use for formatting so that i can be more careful about next PRs. (i know you use cmake format but i dunno what the exact command is)

From:

cihat@jarbay51:~/ws_yasmin$ ros2 run yasmin_demos yasmin_demo
yasmin_demo
Executing state FOO
terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'
[ros2run]: Aborted

To:

cihat@jarbay51:~/ws_yasmin$ ros2 run yasmin_demos yasmin_demo
yasmin_demo
Executing state FOO
terminate called after throwing an instance of 'std::logic_error'
  what():  Outcome (outcome15) does not exist
[ros2run]: Aborted
mgonzs13 commented 2 months ago

Hey @CihatAltiparmak thanks for the contribution.