summaryrefslogtreecommitdiffstats
path: root/src/hooks/dumpoops.cpp
diff options
context:
space:
mode:
authorMichal Toman <mtoman@redhat.com>2010-08-18 11:18:39 +0200
committerMichal Toman <mtoman@redhat.com>2010-08-18 11:18:39 +0200
commit4ef4bc1ba11d9c185db584ed97ce520a6306b462 (patch)
tree5b37f6ca52fd5911b7e65157b4246cc99d7f3fab /src/hooks/dumpoops.cpp
parente0b0da307a78b038045e2cb86934d60befd74339 (diff)
downloadabrt-4ef4bc1ba11d9c185db584ed97ce520a6306b462.tar.gz
abrt-4ef4bc1ba11d9c185db584ed97ce520a6306b462.tar.xz
abrt-4ef4bc1ba11d9c185db584ed97ce520a6306b462.zip
get rid of exceptions in CDebugDump class
Diffstat (limited to 'src/hooks/dumpoops.cpp')
-rw-r--r--src/hooks/dumpoops.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/hooks/dumpoops.cpp b/src/hooks/dumpoops.cpp
index a2d2353a..a14fb65b 100644
--- a/src/hooks/dumpoops.cpp
+++ b/src/hooks/dumpoops.cpp
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
// const plugin_info_t *plugin_info;
CPlugin* (*plugin_newf)(void);
int (*scan_syslog_file)(vector_string_t& oopsList, const char *filename, time_t *last_changed_p);
- void (*save_oops_to_debug_dump)(const vector_string_t& oopsList);
+ int (*save_oops_to_debug_dump)(const vector_string_t& oopsList);
void *handle;
errno = 0;
@@ -110,11 +110,10 @@ int main(int argc, char **argv)
}
if (opt_d) {
log("dumping oopses");
- try {
- save_oops_to_debug_dump(oopsList);
- }
- catch (CABRTException& e) {
- fprintf(stderr, "Error: %s\n", e.what());
+ int errors = save_oops_to_debug_dump(oopsList);
+ if (errors > 0)
+ {
+ log("%d errors while dumping oopses", errors);
return 1;
}
}