-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
-#include <msp/core/except.h>
#include "block.h"
#include "blockiter.h"
#include "route.h"
_entry(b ? e : 0)
{
if(_block && _entry>_block->get_endpoints().size())
- throw InvalidParameterValue("Endpoint index not valid for block");
+ throw out_of_range("BlockIter::BlockIter");
}
TrackIter BlockIter::track_iter() const
const Block::Endpoint &BlockIter::endpoint() const
{
if(!_block)
- throw InvalidState("BlockIter is null");
+ throw logic_error("null block");
return _block->get_endpoint(_entry);
}
while(t_iter)
{
if(!_block->has_track(*t_iter))
- throw LogicError("Block traversal strayed out of the block");
+ throw logic_error("internal error (block traversal escaped the block)");
unsigned path = (route ? route->get_path(*t_iter) : t_iter->get_active_path());
TrackIter t_exit = t_iter.reverse(path);
Block &BlockIter::operator*() const
{
if(!_block)
- throw InvalidState("BlockIter is null");
+ throw logic_error("null block");
return *_block;
}