Commit b9221c86 authored by Eric Cano's avatar Eric Cano
Browse files

Added one second sleeps when uncaught exceptions show up to avoid fast looping...

Added one second sleeps when uncaught exceptions show up to avoid fast looping in the presence of bugs.
parent fea90e69
......@@ -232,11 +232,14 @@ int main(const int argc, char **const argv) {
std::list<cta::log::Param> params = {
cta::log::Param("message", ex.getMessage().str())};
log(log::ERR, "Caught an unexpected CTA exception", params);
sleep(1);
} catch(std::exception &se) {
std::list<cta::log::Param> params = {cta::log::Param("what", se.what())};
log(log::ERR, "Caught an unexpected standard exception", params);
sleep(1);
} catch(...) {
log(log::ERR, "Caught an unexpected and unknown exception");
sleep(1);
}
google::protobuf::ShutdownProtobufLibrary();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment