summaryrefslogtreecommitdiffstats
path: root/src/Hooks
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-01-11 12:27:18 +0100
committerKarel Klic <kklic@redhat.com>2010-01-11 12:27:18 +0100
commitd037916adc56d384717ebd6b7a5963543febc170 (patch)
tree23e7d1a8ab0d948474efba923fa99e718c6d8957 /src/Hooks
parent20645ae11a8a9a89cc712896b2f72a25bc62c8db (diff)
downloadabrt-d037916adc56d384717ebd6b7a5963543febc170.tar.gz
abrt-d037916adc56d384717ebd6b7a5963543febc170.tar.xz
abrt-d037916adc56d384717ebd6b7a5963543febc170.zip
Catch and display ABRTException thrown by CDebugDump::Create
Diffstat (limited to 'src/Hooks')
-rw-r--r--src/Hooks/abrt-hook-python.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Hooks/abrt-hook-python.cpp b/src/Hooks/abrt-hook-python.cpp
index 1a7eacee..d7fca67d 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 <config.h>
#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);