From 2b02070dbe34f79c644b4330cec3dde530985b07 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 26 Feb 2009 12:38:54 +0100 Subject: Exception catching --- src/Daemon/CrashWatcher.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/Daemon/CrashWatcher.cpp') diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 1e447b0..d524e99 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -141,11 +141,18 @@ dbus_map_report_info_t CCrashWatcher::CreateReport(const std::string &pUUID,cons { dbus_map_report_info_t retval; unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str()); - std::cerr << pUUID << ":" << unix_uid << std::endl; + //std::cerr << pUUID << ":" << unix_uid << std::endl; crash_report_t crashReport; std::cerr << "Creating report" << std::endl; - m_pMW->CreateReport(pUUID,to_string(unix_uid), crashReport); - retval = crashReport.GetMap(); + try + { + m_pMW->CreateReport(pUUID,to_string(unix_uid), crashReport); + retval = crashReport.GetMap(); + } + catch(std::string err) + { + std::cerr << err << std::endl; + } return retval; } @@ -161,7 +168,14 @@ bool CCrashWatcher::Report(dbus_map_report_info_t pReport) //} crashReport.SetFromMap(pReport); std::cerr << crashReport.m_sPackage << std::endl; - m_pMW->Report(crashReport); + try + { + m_pMW->Report(crashReport); + } + catch(std::string err) + { + std::cerr << err << std::endl; + } return true; } -- cgit