diff options
| author | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-05-12 14:02:28 +0200 |
|---|---|---|
| committer | Zdenek Prikryl <zdeny@dhcp-lab-218.englab.brq.redhat.com> | 2009-05-12 14:02:28 +0200 |
| commit | c720d6077b907f944573cd09fd84503b592c1526 (patch) | |
| tree | 08bb2fd7fb4068f1496ecffb7b1cb97f06764574 /src/Daemon | |
| parent | 132e3403a62e47df970241c289f718e5ca2ece97 (diff) | |
| parent | fbbf81b50e14aef8abd036c29d90445bec4667c9 (diff) | |
| download | abrt-c720d6077b907f944573cd09fd84503b592c1526.tar.gz abrt-c720d6077b907f944573cd09fd84503b592c1526.tar.xz abrt-c720d6077b907f944573cd09fd84503b592c1526.zip | |
Merge commit 'origin'
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; |
