From 386765bc152c924f82e8d41fb04db88d56505605 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 15 Jul 2010 18:00:00 +0200 Subject: dumpoops/KerneloopsScanner: add pid to crashdump name Otherwise dumpoops -d cut_here.test; dumpoops -d cut_here.test; dumpoops -d cut_here.test aborts Signed-off-by: Denys Vlasenko --- src/Hooks/dumpoops.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Hooks/dumpoops.cpp') diff --git a/src/Hooks/dumpoops.cpp b/src/Hooks/dumpoops.cpp index ab4b6ba3..a2d2353a 100644 --- a/src/Hooks/dumpoops.cpp +++ b/src/Hooks/dumpoops.cpp @@ -23,6 +23,7 @@ #include "abrtlib.h" #include "abrt_types.h" +#include "abrt_exception.h" #include "KerneloopsScanner.h" #include @@ -109,7 +110,13 @@ int main(int argc, char **argv) } if (opt_d) { log("dumping oopses"); - save_oops_to_debug_dump(oopsList); + try { + save_oops_to_debug_dump(oopsList); + } + catch (CABRTException& e) { + fprintf(stderr, "Error: %s\n", e.what()); + return 1; + } } } -- cgit