]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/block.cpp
Add basic support for signals
[r2c2.git] / source / libr2c2 / block.cpp
index 57cb4d30eb7fb62a3f0b15edb7d666f48b8bbdf8..8bab92c1f87f63159ebda4f221cc0e1535de2d39 100644 (file)
@@ -1,10 +1,3 @@
-/* $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"
@@ -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;
 }