From 77a978bb41a5d47afe4f6ed687330b375b77d476 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 20 Dec 2004 09:30:16 +0000 Subject: [PATCH] Exception chaining in create(). --- src/messaging/maildirFolder.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/messaging/maildirFolder.cpp b/src/messaging/maildirFolder.cpp index 4bf1fcfb..54d35989 100644 --- a/src/messaging/maildirFolder.cpp +++ b/src/messaging/maildirFolder.cpp @@ -226,7 +226,7 @@ void maildirFolder::create(const int type) } catch (exceptions::filesystem_exception& e) { - throw exceptions::command_error("CREATE", e.what(), "File system exception"); + throw exceptions::command_error("CREATE", "", "File system exception", e); } // Notify folder created @@ -461,6 +461,13 @@ std::vector maildirFolder::getFolders(const bool recursive) throw; } + catch (vmime::exception&) + { + for (std::vector ::iterator it = list.begin() ; it != list.end() ; ++it) + delete (*it); + + throw; + } return (list); }