-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#include <algorithm>
#include <msp/time/units.h>
#include "block.h"
const Block::Endpoint &Block::get_endpoint(unsigned i) const
{
if(i>=endpoints.size())
- throw InvalidParameterValue("Endpoint index out of range");
+ throw out_of_range("Block::get_endpoint");
return endpoints[i];
}
float Block::get_path_length(unsigned entry, const Route *route) const
{
if(entry>=endpoints.size())
- throw InvalidParameterValue("Endpoint index out of range");
+ throw out_of_range("Block::get_path_length");
TrackIter t_iter(endpoints[entry].track, endpoints[entry].track_ep);
Block *Block::get_link(unsigned epi) const
{
if(epi>=endpoints.size())
- throw InvalidParameterValue("Endpoint index out of range");
+ throw out_of_range("Block::get_link");
return endpoints[epi].link;
}