]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.cpp
Rework exceptions
[libs/gl.git] / source / renderpass.cpp
index 82ca7a3972f28e1d11bd1fde2a4ffb5bf19cbd28..93538d48d64e013f948c33cee22eee989adc0c3b 100644 (file)
@@ -1,6 +1,7 @@
 #include <msp/core/refptr.h>
 #include <msp/datafile/collection.h>
 #include <msp/strings/format.h>
+#include "error.h"
 #include "material.h"
 #include "renderpass.h"
 #include "program.h"
@@ -113,7 +114,7 @@ void RenderPass::Loader::texunit_named(unsigned i, const string &n)
 void RenderPass::Loader::uniforms()
 {
        if(!obj.shprog)
-               throw InvalidState("Can't load uniforms without a shader program");
+               throw invalid_operation("RenderPass::Loader::uniforms");
        if(!obj.shdata)
                obj.shdata = new ProgramData(*obj.shprog);
        load_sub(*obj.shdata);
@@ -143,7 +144,7 @@ void RenderPass::TextureLoader::finish()
 
 void RenderPass::TextureLoader::texenv()
 {
-       throw Exception("TexEnvs can't be loaded yet");
+       throw runtime_error("TexEnvs can't be loaded yet");
        /*env = new TexEnv;
        load_sub(*env);*/
 }