diff options
Diffstat (limited to 'src/Daemon')
| -rw-r--r-- | src/Daemon/CrashWatcher.cpp | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 3525571..ac60145 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -87,9 +87,13 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, cc->m_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT]); } } - catch(std::string err) + catch (CABRTException& e) { - std::cerr << err << std::endl; + std::cerr << e.what() << std::endl; + if (e.type() == EXCEP_ERROR) + { + return -1; + } } } else @@ -421,9 +425,13 @@ void CCrashWatcher::FindNewDumps(const std::string& pPath) m_pMW->RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]); } } - catch(std::string err) + catch (CABRTException& e) { - std::cerr << err << std::endl; + std::cerr << e.what() << std::endl; + if (e.type() == EXCEP_ERROR) + { + exit(-1); + } } } } @@ -517,9 +525,14 @@ vector_crash_infos_t CCrashWatcher::GetCrashInfos(const std::string &pUID) { retval = m_pMW->GetCrashInfos(pUID); } - catch(std::string err) + catch (CABRTException& e) { - std::cerr << err << std::endl; + std::cerr << e.what() << std::endl; + m_pCommLayer->Error(e.what()); + if (e.type() == EXCEP_ERROR) + { + exit(-1); + } } //Notify("Sent crash info"); return retval; @@ -534,9 +547,14 @@ map_crash_report_t CCrashWatcher::CreateReport(const std::string &pUUID,const st m_pMW->CreateCrashReport(pUUID,pUID,crashReport); m_pCommLayer->AnalyzeComplete(crashReport); } - catch(std::string err) + catch (CABRTException& e) { - m_pCommLayer->Error(err); + std::cerr << e.what() << std::endl; + m_pCommLayer->Error(e.what()); + if (e.type() == EXCEP_ERROR) + { + exit(-1); + } } return crashReport; } @@ -554,9 +572,14 @@ bool CCrashWatcher::Report(map_crash_report_t pReport) { m_pMW->Report(pReport); } - catch(std::string err) + catch (CABRTException& e) { - std::cerr << err << std::endl; + std::cerr << e.what() << std::endl; + m_pCommLayer->Error(e.what()); + if (e.type() == EXCEP_ERROR) + { + exit(-1); + } return false; } return true; @@ -568,9 +591,14 @@ bool CCrashWatcher::DeleteDebugDump(const std::string& pUUID, const std::string& { m_pMW->DeleteCrashInfo(pUUID,pUID, true); } - catch(std::string err) + catch (CABRTException& e) { - std::cerr << err << std::endl; + std::cerr << e.what() << std::endl; + m_pCommLayer->Error(e.what()); + if (e.type() == EXCEP_ERROR) + { + return -1; + } return false; } return true; |
