diff options
| author | Vincent Richard <[email protected]> | 2013-11-23 09:16:06 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2013-11-23 09:16:06 +0000 |
| commit | f91b1ec6a08f0b30350c15887763598a145c3889 (patch) | |
| tree | 696583cd34bded11cccd39ce2cb0bd31f2d3936d /src/mailboxGroup.cpp | |
| parent | Do not throw exception for normal code flow. Removed exceptions::no_such_addr... (diff) | |
| download | vmime-f91b1ec6a08f0b30350c15887763598a145c3889.tar.gz vmime-f91b1ec6a08f0b30350c15887763598a145c3889.zip | |
Replaced "no_such_parameter" exception with "std::out_of_range". Fixed argument of std::out_of_range.
Diffstat (limited to 'src/mailboxGroup.cpp')
| -rw-r--r-- | src/mailboxGroup.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mailboxGroup.cpp b/src/mailboxGroup.cpp index d4bbb7db..0245affb 100644 --- a/src/mailboxGroup.cpp +++ b/src/mailboxGroup.cpp @@ -258,7 +258,7 @@ void mailboxGroup::insertMailboxBefore(shared_ptr <mailbox> beforeMailbox, share (m_list.begin(), m_list.end(), beforeMailbox); if (it == m_list.end()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); m_list.insert(it, mbox); } @@ -267,7 +267,7 @@ void mailboxGroup::insertMailboxBefore(shared_ptr <mailbox> beforeMailbox, share void mailboxGroup::insertMailboxBefore(const size_t pos, shared_ptr <mailbox> mbox) { if (pos >= m_list.size()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); m_list.insert(m_list.begin() + pos, mbox); } @@ -279,7 +279,7 @@ void mailboxGroup::insertMailboxAfter(shared_ptr <mailbox> afterMailbox, shared_ (m_list.begin(), m_list.end(), afterMailbox); if (it == m_list.end()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); m_list.insert(it + 1, mbox); } @@ -288,7 +288,7 @@ void mailboxGroup::insertMailboxAfter(shared_ptr <mailbox> afterMailbox, shared_ void mailboxGroup::insertMailboxAfter(const size_t pos, shared_ptr <mailbox> mbox) { if (pos >= m_list.size()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); m_list.insert(m_list.begin() + pos + 1, mbox); } @@ -300,7 +300,7 @@ void mailboxGroup::removeMailbox(shared_ptr <mailbox> mbox) (m_list.begin(), m_list.end(), mbox); if (it == m_list.end()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); m_list.erase(it); } @@ -309,7 +309,7 @@ void mailboxGroup::removeMailbox(shared_ptr <mailbox> mbox) void mailboxGroup::removeMailbox(const size_t pos) { if (pos >= m_list.size()) - throw std::out_of_range(); + throw std::out_of_range("Invalid position"); const std::vector <shared_ptr <mailbox> >::iterator it = m_list.begin() + pos; |
