]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Rework exceptions
[libs/gl.git] / source / object.cpp
index 70c2aeeec8b616dbda605255f7463f87fd795add..1e94d7ccf96b741c2c0b4c1d3efec60ff86a773f 100644 (file)
@@ -1,6 +1,5 @@
 #include <msp/datafile/collection.h>
 #include <msp/strings/format.h>
-#include "except.h"
 #include "material.h"
 #include "mesh.h"
 #include "object.h"
@@ -27,7 +26,7 @@ Object::~Object()
 void Object::set_mesh(unsigned i, const Mesh *m)
 {
        if(i>meshes.size())
-               throw InvalidParameterValue("LODs must be continuous");
+               throw invalid_argument("Object::set_mesh");
 
        if(i==meshes.size())
                meshes.push_back(m);
@@ -141,7 +140,7 @@ void Object::Loader::mesh_inline()
 void Object::Loader::mesh_inline_lod(unsigned l)
 {
        if(l>obj.meshes.size())
-               throw InvalidParameterValue("LODs must be continuous");
+               throw invalid_argument("Object::Loader::mesh_inline_lod");
 
        RefPtr<Mesh> msh = new Mesh;
        load_sub(*msh);