X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Farmature.cpp;h=887d974a025a59827f83ed21219b58e2f5b79f4b;hp=d7a944ede7dbce5ce4dd316572dc7513d790db15;hb=d713e5391dc5d85759c7aab36f6df7a85c3d8eff;hpb=9abfb801dbceb59272f6561731d066ed516340e5 diff --git a/source/armature.cpp b/source/armature.cpp index d7a944ed..887d974a 100644 --- a/source/armature.cpp +++ b/source/armature.cpp @@ -1,3 +1,4 @@ +#include #include "armature.h" using namespace std; @@ -16,7 +17,7 @@ const Armature::Link &Armature::get_link(unsigned index) const for(list::const_iterator i=links.begin(); i!=links.end(); ++i) if(i->get_index()==index) return *i; - throw invalid_argument("Armature::get_link"); + throw key_error(typeid(list)); } const Armature::Link &Armature::get_link(const string &name) const @@ -24,7 +25,7 @@ const Armature::Link &Armature::get_link(const string &name) const for(list::const_iterator i=links.begin(); i!=links.end(); ++i) if(i->get_name()==name) return *i; - throw invalid_argument("Armature::get_link"); + throw key_error(typeid(list)); } unsigned Armature::get_max_link_index() const