]> git.tdb.fi Git - libs/gl.git/commitdiff
Improve exceptions in armature lookups
authorMikko Rasa <tdb@tdb.fi>
Fri, 17 Sep 2021 23:12:48 +0000 (02:12 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 17 Sep 2021 23:12:48 +0000 (02:12 +0300)
source/animation/armature.cpp

index f339ea2a447ba731c6d042458bb41984e81645bf..d8512d82143c1efe92cc9207033ae67acd485a33 100644 (file)
@@ -17,7 +17,7 @@ const Armature::Link &Armature::get_link(unsigned index) const
        for(const Link &l: links)
                if(l.get_index()==index)
                        return l;
-       throw key_error(typeid(list<Link>));
+       throw key_error(index);
 }
 
 const Armature::Link &Armature::get_link(const string &name) const
@@ -25,7 +25,7 @@ const Armature::Link &Armature::get_link(const string &name) const
        for(const Link &l: links)
                if(l.get_name()==name)
                        return l;
-       throw key_error(typeid(list<Link>));
+       throw key_error(name);
 }
 
 unsigned Armature::get_max_link_index() const