summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/SQLite3.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-16 15:09:55 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-16 15:09:55 +0100
commit707f64b85c8a1b88923617ff72bd8a4ca562f3bd (patch)
tree19543e9df7d87a2204e944a332158137805e9a92 /lib/Plugins/SQLite3.cpp
parent1eae9a2bcc8583bf54ec7027ead9b0ae01861481 (diff)
downloadabrt-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/Plugins/SQLite3.cpp')
-rw-r--r--lib/Plugins/SQLite3.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index 12f8a5d..1979f24 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -238,7 +238,18 @@ CSQLite3::CSQLite3() :
CSQLite3::~CSQLite3()
{
- DisConnect();
+ /* Paranoia. In C++, destructor will abort() if it was called while unwinding
+ * the stack and it throws an exception.
+ */
+ try
+ {
+ DisConnect();
+ m_sDBPath.clear();
+ }
+ catch (...)
+ {
+ error_msg_and_die("Internal error");
+ }
}
void CSQLite3::DisConnect()