X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblock.cpp;h=8bab92c1f87f63159ebda4f221cc0e1535de2d39;hb=ca9d278f9472206ad9a01190dcef9f0eb1bcc274;hp=57cb4d30eb7fb62a3f0b15edb7d666f48b8bbdf8;hpb=b14059de03324aecde3efc649293d98ce5b7aaf2;p=r2c2.git diff --git a/source/libr2c2/block.cpp b/source/libr2c2/block.cpp index 57cb4d3..8bab92c 100644 --- a/source/libr2c2/block.cpp +++ b/source/libr2c2/block.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include #include "block.h" @@ -93,7 +86,7 @@ bool Block::has_track(Track &t) const 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]; } @@ -110,7 +103,7 @@ int Block::get_endpoint_by_link(Block &other) const 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); @@ -159,7 +152,7 @@ void Block::break_link(Block &other) 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; }