X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fblock.cpp;h=8bab92c1f87f63159ebda4f221cc0e1535de2d39;hb=ca9d278f9472206ad9a01190dcef9f0eb1bcc274;hp=ec313d9d415240dab9114a27be838f27111112e4;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/libr2c2/block.cpp b/source/libr2c2/block.cpp index ec313d9..8bab92c 100644 --- a/source/libr2c2/block.cpp +++ b/source/libr2c2/block.cpp @@ -86,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]; } @@ -103,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); @@ -152,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; }