Commit 3c593ec9 authored by Eric Cano's avatar Eric Cano
Browse files

Improved logging when TapeDaemon::runMountSession receives an unexpected exception with backtrace.

parent 6802dc47
......@@ -916,9 +916,15 @@ void castor::tape::tapeserver::daemon::TapeDaemon::runMountSession(
}
exit (mountSession->execute());
} catch(castor::exception::Exception & ex) {
params.push_back(log::Param("message", ex.getMessageValue()));
m_log(LOG_ERR, "Aborting mount session: Caught an unexpected CASTOR exception", params);
castor::log::LogContext lc(m_log);
lc.logBacktrace(LOG_ERR, ex.backtrace());
exit(1);
} catch(std::exception &se) {
params.push_back(log::Param("message", se.what()));
m_log(LOG_ERR, "Aborting mount session: Caught an unexpected exception", params);
m_log(LOG_ERR, "Aborting mount session: Caught an unexpected standard exception", params);
exit(1);
} catch(...) {
m_log(LOG_ERR, "Aborting mount session: Caught an unexpected and unknown exception", params);
......
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