I am trying to use ROS_INFO_STREAM inside an illegible try ... catch, but I only have top level output
Here's the minimum code group:
void failure()
{
try
{
std::string("abc").substr(10);
}
catch (...)
{
ROS_ERROR_STREAM("ROS failure()");
std::cout << "cout failure()" << std::endl;
throw;
}
}
int main()
{
try
{
ROS_ERROR_STREAM("ROS calling");
failure();
}
catch (...)
{
ROS_ERROR_STREAM("ROS call function");
std::cout << "cout call function" << std::endl;
}
return 0;
}
exit:
ROS calling
ROS failure()
cout failure()
cout call function
I assume that ROS_ERROR_STREAM looks buffered, but it should not be an error output.
I run ros groovy
source
share