From 0af0373cb649d57626f82d9ace8a58a7b0764059 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sat, 16 Feb 2013 11:23:30 +0100 Subject: [PATCH] Always throw std exceptions (eg. bad_alloc) and VMime time out exceptions. --- vmime/net/imap/IMAPParser.hpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp index 43f86226..6a68b0c0 100644 --- a/vmime/net/imap/IMAPParser.hpp +++ b/vmime/net/imap/IMAPParser.hpp @@ -4962,7 +4962,12 @@ private: { resp->go(*this, line, currentPos); } - catch (...) + catch (exceptions::operation_timed_out& e) + { + // Always rethrow + throw; + } + catch (exception& e) { *currentPos = oldPos; @@ -4992,7 +4997,12 @@ public: TYPE term; term.go(*this, line, currentPos); } - catch (...) + catch (exceptions::operation_timed_out& e) + { + // Always rethrow + throw; + } + catch (exception& e) { *currentPos = oldPos; @@ -5014,7 +5024,12 @@ public: TYPE term(arg); term.go(*this, line, currentPos); } - catch (...) + catch (exceptions::operation_timed_out& e) + { + // Always rethrow + throw; + } + catch (exception& e) { *currentPos = oldPos;