X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fvehicle.cpp;h=1699fd8eeef1cf0b89618cb806d3c6623aabc07b;hb=72edbf54afe12b47bfe9c3a030d6c6ae695bda18;hp=cf00c7706e3e991a9acc53d607f7c56798bb5595;hpb=9bab44d27a89602565270e71d8684fb3f2fac5be;p=r2c2.git diff --git a/source/libr2c2/vehicle.cpp b/source/libr2c2/vehicle.cpp index cf00c77..1699fd8 100644 --- a/source/libr2c2/vehicle.cpp +++ b/source/libr2c2/vehicle.cpp @@ -121,30 +121,30 @@ void Vehicle::advance(float d) const Vehicle::Axle &Vehicle::get_fixed_axle(unsigned i) const { if(i>=axles.size()) - throw InvalidParameterValue("Axle index out of range"); + throw out_of_range("Vehicle::get_fixed_axle"); return axles[i]; } const Vehicle::Bogie &Vehicle::get_bogie(unsigned i) const { if(i>=bogies.size()) - throw InvalidParameterValue("Bogie index out of range"); + throw out_of_range("Vehicle::get_bogie"); return bogies[i]; } const Vehicle::Axle &Vehicle::get_bogie_axle(unsigned i, unsigned j) const { if(i>=bogies.size()) - throw InvalidParameterValue("Bogie index out of range"); + throw out_of_range("Vehicle::get_bogie_axle"); if(j>=bogies[i].axles.size()) - throw InvalidParameterValue("Axle index out of range"); + throw out_of_range("Vehicle::get_bogie_axle"); return bogies[i].axles[j]; } const Vehicle::Rod &Vehicle::get_rod(unsigned i) const { if(i>=rods.size()) - throw InvalidParameterValue("Rod index out of range"); + throw out_of_range("Vehicle::get_rod"); return rods[i]; }