]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Exception fixes
[libs/gl.git] / source / object.cpp
index 964099e51e4022c09335c16b7ca023d491de7c26..bd899961030095439688bf3bdc866691cfccb088 100644 (file)
@@ -32,7 +32,7 @@ Object::~Object()
 void Object::set_mesh(unsigned i, const Mesh *m)
 {
        if(i>meshes.size())
-               throw invalid_argument("Object::set_mesh");
+               throw out_of_range("Object::set_mesh");
 
        if(i==meshes.size())
                meshes.push_back(m);
@@ -144,7 +144,7 @@ void Object::Loader::mesh_inline()
 void Object::Loader::mesh_inline_lod(unsigned l)
 {
        if(l>obj.meshes.size())
-               throw invalid_argument("Object::Loader::mesh_inline_lod");
+               throw out_of_range("Object::Loader::mesh_inline_lod");
 
        RefPtr<Mesh> msh = new Mesh;
        load_sub(*msh);