part of the patch from #3177 that should have been committed with r12442

This commit is contained in:
Brian Gerkey 2010-12-24 17:08:37 +00:00
parent 841a30894f
commit ecb76c0d43
1 changed files with 6 additions and 3 deletions

View File

@ -55,12 +55,15 @@ std::string command(const std::string& _cmd)
ret = rp.run(_cmd);
if(ret == 0)
return rp.getOutput();
else
std::cerr << "ROSPack::run returned non-zero." << std::endl;
else {
if ( !rp.is_quiet() )
std::cerr << "ROSPack::run returned non-zero." << std::endl;
}
}
catch(std::runtime_error &e)
{
std::cerr << "[rospack] " << e.what() << std::endl;
if ( !rp.is_quiet() )
std::cerr << "[rospack] " << e.what() << std::endl;
}
return std::string("");
}