diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-26 12:38:54 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-02-26 12:38:54 +0100 |
| commit | 2b02070dbe34f79c644b4330cec3dde530985b07 (patch) | |
| tree | 6f900d401f2a9fedb8f962d35ab3c567efc95e4f /src | |
| parent | 825f406304145d719e9b8b1eeeb70a2d78b7bf9a (diff) | |
| download | abrt-2b02070dbe34f79c644b4330cec3dde530985b07.tar.gz abrt-2b02070dbe34f79c644b4330cec3dde530985b07.tar.xz abrt-2b02070dbe34f79c644b4330cec3dde530985b07.zip | |
Exception catching
Diffstat (limited to 'src')
| -rw-r--r-- | src/Daemon/CrashWatcher.cpp | 22 | ||||
| -rw-r--r-- | src/Gui/CCMainWindow.py | 3 |
2 files changed, 21 insertions, 4 deletions
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; } diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index b3c6a84..a7fc327 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -127,6 +127,9 @@ class MainWindow(): dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), len(self.dlist.get_columns())) # show the report window with selected dump report = self.ccdaemon.getReport(dump.getUUID()) + if not report: + gui_error_message("Unable to get report! Debuginfo missing?") + return report_dialog = ReporterDialog(report) result = report_dialog.run() if result == -1: |
