From: Mikko Rasa Date: Mon, 11 Oct 2021 13:25:41 +0000 (+0300) Subject: Fix incorrect exception messages X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=39495091719dfc699b6454f6b23925b03544da9a;p=libs%2Fgl.git Fix incorrect exception messages --- diff --git a/source/backends/opengl/program_backend.cpp b/source/backends/opengl/program_backend.cpp index b902db5f..bd54fbaa 100644 --- a/source/backends/opengl/program_backend.cpp +++ b/source/backends/opengl/program_backend.cpp @@ -69,11 +69,11 @@ unsigned OpenGLProgram::add_stage(Stage type) case VERTEX: { static Require _req(ARB_vertex_shader); gl_type = GL_VERTEX_SHADER; } break; case GEOMETRY: { static Require _req(ARB_geometry_shader4); gl_type = GL_GEOMETRY_SHADER; } break; case FRAGMENT: { static Require _req(ARB_fragment_shader); gl_type = GL_FRAGMENT_SHADER; } break; - default: throw invalid_argument("Program::add_stage"); + default: throw invalid_argument("OpenGLProgram::add_stage"); } if(stage_ids[type]) - throw invalid_operation("Program::add_stage"); + throw invalid_operation("OpenGLProgram::add_stage"); unsigned stage_id = glCreateShader(gl_type); stage_ids[type] = stage_id; @@ -101,7 +101,7 @@ void OpenGLProgram::add_glsl_stages(const GlslModule &mod, const map stages = compiler.get_stages(); if(stages.empty()) - throw invalid_argument("Program::add_glsl_stages"); + throw invalid_argument("OpenGLProgram::add_glsl_stages"); for(SL::Stage::Type st: stages) { @@ -111,7 +111,7 @@ void OpenGLProgram::add_glsl_stages(const GlslModule &mod, const map &code = mod.get_code(); glShaderBinary(n_stages, used_stage_ids, GL_SHADER_BINARY_FORMAT_SPIR_V, &code[0], code.size()*4); @@ -371,7 +371,7 @@ void OpenGLProgram::query_uniform_blocks(const vectorblock = &info; } diff --git a/source/core/vertexsetup.cpp b/source/core/vertexsetup.cpp index 7b346d8e..50f9c183 100644 --- a/source/core/vertexsetup.cpp +++ b/source/core/vertexsetup.cpp @@ -23,9 +23,9 @@ void VertexSetup::set_format(const VertexFormat &vfmt) void VertexSetup::set_format_instanced(const VertexFormat &vfmt, const VertexFormat &ifmt) { if(!verify_format(vfmt) || !verify_format(ifmt)) - throw invalid_argument("VertexSetup::set_format"); + throw invalid_argument("VertexSetup::set_format_instanced"); if(!vertex_format.empty()) - throw invalid_operation("VertexSetup::set_format"); + throw invalid_operation("VertexSetup::set_format_instanced"); require_format(vfmt, false); require_format(ifmt, true);