diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-16 15:09:55 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-16 15:09:55 +0100 |
commit | 707f64b85c8a1b88923617ff72bd8a4ca562f3bd (patch) | |
tree | 19543e9df7d87a2204e944a332158137805e9a92 /lib/Utils/DebugDump.cpp | |
parent | 1eae9a2bcc8583bf54ec7027ead9b0ae01861481 (diff) | |
download | abrt-707f64b85c8a1b88923617ff72bd8a4ca562f3bd.tar.gz abrt-707f64b85c8a1b88923617ff72bd8a4ca562f3bd.tar.xz abrt-707f64b85c8a1b88923617ff72bd8a4ca562f3bd.zip |
prevent destructors from throwing exceptions; check curl_easy_init errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/DebugDump.cpp')
-rw-r--r-- | lib/Utils/DebugDump.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 765b514..b4c3ee4 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -68,6 +68,22 @@ CDebugDump::CDebugDump() : m_bLocked(false) {} +CDebugDump::~CDebugDump() +{ + /* Paranoia. In C++, destructor will abort() if it was called while unwinding + * the stack and it throws an exception. + */ + try + { + Close(); + m_sDebugDumpDir.clear(); + } + catch (...) + { + error_msg_and_die("Internal error"); + } +} + void CDebugDump::Open(const char *pDir) { if (m_bOpened) |