aboutsummaryrefslogtreecommitdiffstats
path: root/src/mailboxList.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-23 08:43:35 +0000
committerVincent Richard <[email protected]>2013-11-23 08:43:35 +0000
commitdef78908846541460b9d0142a76bf58732326c99 (patch)
tree46626d28fa40b3b0e1b79b26b884ff67c21d63be /src/mailboxList.cpp
parentDo not throw exception for normal code flow (removed exceptions::no_object_fo... (diff)
downloadvmime-def78908846541460b9d0142a76bf58732326c99.tar.gz
vmime-def78908846541460b9d0142a76bf58732326c99.zip
Do not throw exception for normal code flow. Removed exceptions::no_such_address and exceptions::no_such_mailbox, using std::out_of_range instead.
Diffstat (limited to 'src/mailboxList.cpp')
-rw-r--r--src/mailboxList.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/mailboxList.cpp b/src/mailboxList.cpp
index 0a76c52a..7d6674fc 100644
--- a/src/mailboxList.cpp
+++ b/src/mailboxList.cpp
@@ -49,14 +49,7 @@ void mailboxList::appendMailbox(shared_ptr <mailbox> mbox)
void mailboxList::insertMailboxBefore(shared_ptr <mailbox> beforeMailbox, shared_ptr <mailbox> mbox)
{
- try
- {
- m_list.insertAddressBefore(beforeMailbox, mbox);
- }
- catch (exceptions::no_such_address&)
- {
- throw exceptions::no_such_mailbox();
- }
+ m_list.insertAddressBefore(beforeMailbox, mbox);
}
@@ -68,14 +61,7 @@ void mailboxList::insertMailboxBefore(const size_t pos, shared_ptr <mailbox> mbo
void mailboxList::insertMailboxAfter(shared_ptr <mailbox> afterMailbox, shared_ptr <mailbox> mbox)
{
- try
- {
- m_list.insertAddressAfter(afterMailbox, mbox);
- }
- catch (exceptions::no_such_address&)
- {
- throw exceptions::no_such_mailbox();
- }
+ m_list.insertAddressAfter(afterMailbox, mbox);
}
@@ -87,14 +73,7 @@ void mailboxList::insertMailboxAfter(const size_t pos, shared_ptr <mailbox> mbox
void mailboxList::removeMailbox(shared_ptr <mailbox> mbox)
{
- try
- {
- m_list.removeAddress(mbox);
- }
- catch (exceptions::no_such_address&)
- {
- throw exceptions::no_such_mailbox();
- }
+ m_list.removeAddress(mbox);
}