I'm trying to use ROS_INFO_STREAM inside an imbricated try...catch but I only have the top-level output
Here's a minimal bunch of code:
void failure()
{
try
{
// throw std::length_error
std::string("abc").substr(10);
}
catch (...)
{
ROS_ERROR_STREAM("ROS failure()"); // print OK
std::cout << "cout failure()" << std::endl; // print OK
throw; // re-throw the exception
}
}
int main()
{
try
{
ROS_ERROR_STREAM("ROS calling"); // print OK
failure(); // will throw
}
catch (...)
{
ROS_ERROR_STREAM("ROS call function"); // <-- NO print
std::cout << "cout call function" << std::endl; // print OK
}
return 0;
}
output:
ROS calling
ROS failure()
cout failure()
cout call function
My guess would be that ROS_ERROR_STREAM looks buffered but as an error output it shouldn't be.
I'm running ROS Groovy