From d037916adc56d384717ebd6b7a5963543febc170 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Mon, 11 Jan 2010 12:27:18 +0100 Subject: Catch and display ABRTException thrown by CDebugDump::Create --- src/Hooks/abrt-hook-python.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Hooks/abrt-hook-python.cpp') diff --git a/src/Hooks/abrt-hook-python.cpp b/src/Hooks/abrt-hook-python.cpp index 1a7eace..d7fca67 100644 --- a/src/Hooks/abrt-hook-python.cpp +++ b/src/Hooks/abrt-hook-python.cpp @@ -26,6 +26,7 @@ #include "abrtlib.h" #include "hooklib.h" #include "DebugDump.h" +#include "ABRTException.h" #if HAVE_CONFIG_H # include #endif @@ -108,7 +109,12 @@ int main(int argc, char** argv) snprintf(path, sizeof(path), DEBUG_DUMPS_DIR"/pyhook-%ld-%s", (long)time(NULL), pid); CDebugDump dd; - dd.Create(path, geteuid()); + + try { + dd.Create(path, geteuid()); + } catch (CABRTException &e) { + error_msg_and_die("Error while creating debug dump: %s", e.what()); + } dd.SaveText(FILENAME_ANALYZER, "Python"); dd.SaveText(FILENAME_EXECUTABLE, executable); -- cgit