Unverified Commit 77b16a31 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #139 from jcarpent/devel

FIX: throw when no contact is available
parents 8cb5e267 5f15b65c
......@@ -255,6 +255,9 @@ public:
/// @brief get the i-th contact calculated
const Contact& getContact(size_t i) const
{
if(contacts.size() == 0)
throw std::invalid_argument("The number of contacts is zero. No Contact can be returned.");
if(i < contacts.size())
return contacts[i];
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment