Exception chaining in create().

This commit is contained in:
Vincent Richard 2004-12-20 09:30:16 +00:00
parent 64addbf0b5
commit 77a978bb41

View File

@ -226,7 +226,7 @@ void maildirFolder::create(const int type)
} }
catch (exceptions::filesystem_exception& e) 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 // Notify folder created
@ -461,6 +461,13 @@ std::vector <folder*> maildirFolder::getFolders(const bool recursive)
throw; throw;
} }
catch (vmime::exception&)
{
for (std::vector <folder*>::iterator it = list.begin() ; it != list.end() ; ++it)
delete (*it);
throw;
}
return (list); return (list);
} }