summaryrefslogtreecommitdiffstats
path: root/src/CLI/ABRTSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CLI/ABRTSocket.cpp')
-rw-r--r--src/CLI/ABRTSocket.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/CLI/ABRTSocket.cpp b/src/CLI/ABRTSocket.cpp
index d31c7a4f..13531342 100644
--- a/src/CLI/ABRTSocket.cpp
+++ b/src/CLI/ABRTSocket.cpp
@@ -13,7 +13,17 @@ CABRTSocket::CABRTSocket() : m_nSocket(-1)
CABRTSocket::~CABRTSocket()
{
- Disconnect();
+ /* Paranoia. In C++, destructor will abort() if it was called while unwinding
+ * the stack and it throws an exception.
+ */
+ try
+ {
+ Disconnect();
+ }
+ catch (...)
+ {
+ error_msg_and_die("Internal error");
+ }
}
void CABRTSocket::Send(const std::string& pMessage)