From 4ef4bc1ba11d9c185db584ed97ce520a6306b462 Mon Sep 17 00:00:00 2001 From: Michal Toman Date: Wed, 18 Aug 2010 11:18:39 +0200 Subject: get rid of exceptions in CDebugDump class --- src/hooks/dumpoops.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/hooks/dumpoops.cpp') 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; } } -- cgit