aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-12-20 09:30:16 +0000
committerVincent Richard <[email protected]>2004-12-20 09:30:16 +0000
commit77a978bb41a5d47afe4f6ed687330b375b77d476 (patch)
tree8b350f2921286caa3c2e47eba5e2459aa89512cf
parentChanged permissions when creating file/directory. (diff)
downloadvmime-77a978bb41a5d47afe4f6ed687330b375b77d476.tar.gz
vmime-77a978bb41a5d47afe4f6ed687330b375b77d476.zip
Exception chaining in create().
-rw-r--r--src/messaging/maildirFolder.cpp9
1 files changed, 8 insertions, 1 deletions
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 <folder*> maildirFolder::getFolders(const bool recursive)
throw;
}
+ catch (vmime::exception&)
+ {
+ for (std::vector <folder*>::iterator it = list.begin() ; it != list.end() ; ++it)
+ delete (*it);
+
+ throw;
+ }
return (list);
}