Skip to content
Snippets Groups Projects
Commit 126e1930 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Better exception handling in case metrics couldn't be updated

parent fee58ae8
Branches
Tags
No related merge requests found
......@@ -326,9 +326,18 @@ void castor::rh::RHThread::run(void* param) {
castor::metrics::MetricsCollector* mc =
castor::metrics::MetricsCollector::getInstance();
if(mc) {
// catch and ignore any exception at this stage
mc->updateHistograms(fr);
}
} catch (castor::exception::Exception& e) {
// "Exception caught"
castor::dlf::Param params[] =
{castor::dlf::Param("Standard Message", sstrerror(e.code())),
castor::dlf::Param("Precise Message", e.getMessage().str())};
castor::dlf::dlf_writep(cuuid, DLF_LVL_WARNING, 9, 2, params);
}
try {
// Look for the client host: if it is SRM, then
// try to reuse the user tag as a UUID. This enables full tracing
// of requests coming from SRM. In any case ignore any failure.
......@@ -339,7 +348,6 @@ void castor::rh::RHThread::run(void* param) {
}
fr->setReqId(uuid);
// Log now "New Request Arrival" with the resolved UUID
castor::dlf::dlf_writep(cuuid, DLF_LVL_SYSTEM, 1, 1, peerParams);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment