OGLplus (0.45.0) a C++ wrapper for OpenGL

error.hpp File Reference

Declaration of OGLplus' exceptions. More...

#include <oglplus/auxiliary/obj_desc.hpp>
#include <oglplus/config.hpp>
#include <stdexcept>
#include <cassert>
#include <list>
#include <map>
#include <oglplus/error.ipp>

Go to the source code of this file.

Classes

struct  oglplus::ErrorInfo
 Basic information about exception's throw site and propagation trace points. More...
 
class  oglplus::Error
 Exception class for general OpenGL errors. More...
 
class  oglplus::OutOfMemory
 Exception class for out-of-memory OpenGL errors. More...
 
class  oglplus::MissingFunction
 Exception class for situations when a pointer to a GL function is invalid. More...
 
class  oglplus::LimitError
 Exception indicating exceeded implementation-defined limits. More...
 
class  oglplus::ShaderVariableError
 Exception indicating shader variable-related error. More...
 
struct  oglplus::ErrorData
 Structure containing all error-related data; Used in custom error handlers. More...
 
class  oglplus::LocalErrorHandler
 A RAII class installing a temporary custom error handler. More...
 

Namespaces

 oglplus
 All definitions of OGLplus are nested in the oglplus namespace.
 

Constant Groups

 oglplus
 All definitions of OGLplus are nested in the oglplus namespace.
 

Macros

#define OGLPLUS_IS_ERROR(EXPRESSION)
 This macro decides if error handling should be done. More...
 
#define OGLPLUS_CHECK(PARAM)
 Macro checking and possibly handling run-time errors in previous call to GL. More...
 
#define OGLPLUS_VERIFY(PARAM)
 Macro asserting that no errors occured in prevous call to GL. More...
 

Typedefs

typedef std::function< bool(const
ErrorData &)> 
oglplus::ErrorHandlerFunc
 Type of installable custom error handler functor. More...
 

Functions

const char * oglplus::ErrorGLSymbol (const ErrorInfo &info)
 Returns the name of the symbol or constant related to the error. More...
 
const char * oglplus::ErrorFile (const ErrorInfo &info)
 Returns the path of the source file where the exception originated. More...
 
const char * oglplus::ErrorFunc (const ErrorInfo &info)
 Returns the name of the function where the exception originated. More...
 
unsigned oglplus::ErrorLine (const ErrorInfo &info)
 Returns the line in the source file where the exception originated. More...
 
const char * oglplus::ErrorClassName (const ErrorInfo &info)
 Returns the name of the class of the object where the exception originated. More...
 
const char * oglplus::ErrorBindTarget (const ErrorInfo &info)
 Returns the name of the binding point the object where the exception originated. More...
 
const Stringoglplus::ErrorObjectDescription (const ErrorInfo &info)
 Returns the optional description of the object related to the error. More...
 

Detailed Description

Declaration of OGLplus' exceptions.

Author
Matus Chochlik

Copyright 2010-2014 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Macro Definition Documentation

#define OGLPLUS_CHECK (   PARAM)

Macro checking and possibly handling run-time errors in previous call to GL.

This macro is called immediatelly after calls to GL functions that may fail due to invalid values of run-time parameters.

Referenced by oglplus::ProgramPipelineOps::ActiveShaderProgram(), oglplus::DefaultTextureOps::Anisotropy(), oglplus::UniformSubroutines::Apply(), oglplus::FramebufferOps::AttachColorRenderbuffer(), oglplus::FramebufferOps::AttachColorTexture(), oglplus::FramebufferOps::AttachRenderbuffer(), oglplus::FramebufferOps::AttachTexture(), oglplus::FramebufferOps::AttachTexture1D(), oglplus::FramebufferOps::AttachTexture2D(), oglplus::FramebufferOps::AttachTexture3D(), oglplus::FramebufferOps::AttachTextureLayer(), oglplus::DefaultTextureOps::BaseLevel(), oglplus::PerfMonitorAMDOps::Begin(), oglplus::TextureOps::BindImage(), oglplus::VertexAttribOps::BindLocation(), oglplus::ProgramOps::BindLocation(), oglplus::context::PixelOps::BlitFramebuffer(), oglplus::SamplerOps::BorderColor(), oglplus::DefaultTextureOps::BorderColor(), oglplus::DefaultTextureOps::Buffer(), oglplus::DefaultTextureOps::BufferRange(), oglplus::BufferRawMap::BufferRawMap(), oglplus::context::ClearBuffers::ClearColorBuffer(), oglplus::BufferOps::ClearData(), oglplus::context::ClearBuffers::ClearDepthBuffer(), oglplus::TextureOps::ClearImage(), oglplus::context::ClearBuffers::ClearStencilBuffer(), oglplus::BufferOps::ClearSubData(), oglplus::TextureOps::ClearSubImage(), oglplus::NV_path_rendering::ColorGen(), oglplus::context::BufferMasking::ColorWriteMask(), oglplus::SamplerOps::CompareFunc(), oglplus::DefaultTextureOps::CompareFunc(), oglplus::SamplerOps::CompareMode(), oglplus::DefaultTextureOps::CompareMode(), oglplus::ShaderOps::Compile(), oglplus::DefaultTextureOps::CompressedImage1D(), oglplus::DefaultTextureOps::CompressedImage2D(), oglplus::DefaultTextureOps::CompressedImage3D(), oglplus::DefaultTextureOps::CompressedSubImage1D(), oglplus::DefaultTextureOps::CompressedSubImage2D(), oglplus::DefaultTextureOps::CompressedSubImage3D(), oglplus::DefaultTextureOps::CopyImage1D(), oglplus::DefaultTextureOps::CopyImage2D(), oglplus::BufferOps::CopySubData(), oglplus::DefaultTextureOps::CopySubImage1D(), oglplus::DefaultTextureOps::CopySubImage2D(), oglplus::DefaultTextureOps::CopySubImage3D(), oglplus::NV_path_rendering::CoverDepthFunc(), oglplus::BufferOps::Data(), oglplus::NV_path_rendering::DepthOffset(), oglplus::context::ViewportOps::DepthRange(), oglplus::context::ViewportOps::DepthRangeArray(), oglplus::DefaultTextureOps::DepthStencilMode(), oglplus::context::Computing::DispatchCompute(), oglplus::context::Computing::DispatchComputeIndirect(), oglplus::VertexAttribOps::Divisor(), oglplus::PerfMonitorAMDOps::End(), oglplus::DefaultTextureOps::Filter(), oglplus::BufferRawMap::FlushRange(), oglplus::VertexAttribArray::Format(), oglplus::DefaultTextureOps::GenerateMipmap(), oglplus::PerfMonitorAMDGroup::GetCounters(), oglplus::AMD_performance_monitor::GetGroups(), oglplus::PerfMonitorAMDCounter::GetString(), oglplus::PerfMonitorAMDGroup::GetString(), oglplus::BufferOps::GPUAddress(), oglplus::VertexAttribArray::IFormat(), oglplus::DefaultTextureOps::Image1D(), oglplus::DefaultTextureOps::Image2D(), oglplus::DefaultTextureOps::Image2DMultisample(), oglplus::DefaultTextureOps::Image3D(), oglplus::DefaultTextureOps::Image3DMultisample(), oglplus::DefaultTextureOps::ImageCM(), oglplus::FramebufferOps::Invalidate(), oglplus::BufferOps::InvalidateData(), oglplus::TextureOps::InvalidateImage(), oglplus::BufferOps::InvalidateSubData(), oglplus::TextureOps::InvalidateSubImage(), oglplus::VertexAttribArray::IPointer(), oglplus::VertexAttribArray::LFormat(), oglplus::SamplerOps::LODBias(), oglplus::DefaultTextureOps::LODBias(), oglplus::VertexAttribArray::LPointer(), oglplus::SamplerOps::MagFilter(), oglplus::DefaultTextureOps::MagFilter(), oglplus::BufferOps::MakeNonResident(), oglplus::BufferOps::MakeResident(), oglplus::DefaultTextureOps::MaxLevel(), oglplus::SamplerOps::MaxLOD(), oglplus::DefaultTextureOps::MaxLOD(), oglplus::SamplerOps::MinFilter(), oglplus::DefaultTextureOps::MinFilter(), oglplus::SamplerOps::MinLOD(), oglplus::DefaultTextureOps::MinLOD(), oglplus::context::PixelOps::PixelStore(), oglplus::VertexAttribArray::Pointer(), oglplus::context::PixelOps::ReadPixels(), oglplus::PerfMonitorAMDOps::Result(), oglplus::PerfMonitorAMDOps::ResultAvailable(), oglplus::context::ScissorTest::Scissor(), oglplus::context::ScissorTest::ScissorArray(), oglplus::context::ScissorTest::ScissorBox(), oglplus::SamplerOps::Seamless(), oglplus::DefaultTextureOps::Seamless(), oglplus::PerfMonitorAMDOps::SelectCounters(), oglplus::FramebufferOps::Status(), oglplus::RenderbufferOps::Storage(), oglplus::BufferOps::Storage(), oglplus::DefaultTextureOps::Storage1D(), oglplus::DefaultTextureOps::Storage2D(), oglplus::DefaultTextureOps::Storage3D(), oglplus::RenderbufferOps::StorageMultisample(), oglplus::BufferOps::SubData(), oglplus::DefaultTextureOps::SubImage1D(), oglplus::DefaultTextureOps::SubImage2D(), oglplus::DefaultTextureOps::SubImage3D(), oglplus::DefaultTextureOps::Swizzle(), oglplus::DefaultTextureOps::SwizzleRGBA(), oglplus::Sync::Sync(), oglplus::NV_path_rendering::TexGen(), oglplus::PerfMonitorAMDCounter::Type(), oglplus::ProgramPipelineOps::UseStages(), oglplus::TextureOps::View(), oglplus::context::ViewportOps::Viewport(), oglplus::context::ViewportOps::ViewportArray(), oglplus::SamplerOps::Wrap(), and oglplus::DefaultTextureOps::Wrap().

#define OGLPLUS_IS_ERROR (   EXPRESSION)

This macro decides if error handling should be done.

The EXPRESSION parameter is a boolean expression and true values indicate an error condition. If this macro returns a false expression any error handling is skipped.

Referenced by oglplus::ShaderOps::Compile(), oglplus::FramebufferOps::Complete(), oglplus::LimitedCount< Query >::LimitedCount(), and oglplus::ProgramPipelineOps::Validate().

#define OGLPLUS_VERIFY (   PARAM)

Macro asserting that no errors occured in prevous call to GL.

This macro is called immediatelly after calls to GL functions that "should not" fail and if they do fail it indicates a program logic error that is not dependent on run-time parameters.

Referenced by oglplus::DefaultTransformFeedbackOps::Activator::Activator(), oglplus::DefaultTextureOps::Active(), oglplus::DefaultTextureOps::Barrier(), oglplus::DefaultTransformFeedbackOps::Begin(), oglplus::QueryOps::Begin(), oglplus::NoVertexArray::Bind(), oglplus::SamplerOps::Bind(), oglplus::DefaultFramebuffer::Bind(), oglplus::DefaultTransformFeedback::Bind(), oglplus::NoProgramPipeline::Bind(), oglplus::NoRenderbuffer::Bind(), oglplus::NoSampler::Bind(), oglplus::NoBuffer::Bind(), oglplus::DefaultTexture::Bind(), oglplus::TextureOps::Bind(), oglplus::BufferOps::BindBase(), oglplus::NoBuffer::BindBase(), oglplus::FramebufferOps::BindDefault(), oglplus::TransformFeedbackOps::BindDefault(), oglplus::TextureOps::BindImage(), oglplus::BufferOps::BindRange(), oglplus::context::Blending::BlendColor(), oglplus::context::Blending::BlendEquation(), oglplus::context::Blending::BlendEquationSeparate(), oglplus::context::Blending::BlendFunc(), oglplus::context::Blending::BlendFuncSeparate(), oglplus::context::ClearBuffers::Clear(), oglplus::context::ClearBuffers::ClearColor(), oglplus::context::ClearBuffers::ClearDepth(), oglplus::context::ClearBuffers::ClearStencil(), oglplus::context::ClearBuffers::ClearStencilValue(), oglplus::Sync::ClientWait(), oglplus::context::ClearBuffers::ColorClearValue(), oglplus::context::BufferMasking::ColorMask(), oglplus::ARB_debug_output::Control(), oglplus::KHR_debug::Control(), oglplus::QueryOps::Counter(), oglplus::context::Rasterization::CullFace(), oglplus::context::Rasterization::CullFaceMode(), oglplus::UniformBlockTpl< Unspecified >::DataSize(), oglplus::context::ClearBuffers::DepthClearValue(), oglplus::context::DepthTest::DepthFunc(), oglplus::context::BufferMasking::DepthMask(), oglplus::context::BufferMasking::DepthWriteMask(), oglplus::context::Capabilities::Disable(), oglplus::VertexAttribArray::Disable(), oglplus::context::Drawing::DrawArrays(), oglplus::context::Drawing::DrawArraysIndirect(), oglplus::context::Drawing::DrawArraysInstanced(), oglplus::context::Drawing::DrawArraysInstancedBaseInstance(), oglplus::context::BufferSelection::DrawBuffer(), oglplus::context::BufferSelection::DrawBuffers(), oglplus::context::Drawing::DrawElements(), oglplus::context::Drawing::DrawElementsBaseVertex(), oglplus::context::Drawing::DrawElementsIndirect(), oglplus::context::Drawing::DrawElementsInstanced(), oglplus::context::Drawing::DrawElementsInstancedBaseInstance(), oglplus::context::Drawing::DrawElementsInstancedBaseVertex(), oglplus::context::Drawing::DrawElementsInstancedBaseVertexBaseInstance(), oglplus::context::Drawing::DrawRangeElements(), oglplus::context::Drawing::DrawRangeElementsBaseVertex(), oglplus::context::Capabilities::Enable(), oglplus::VertexAttribArray::Enable(), oglplus::ARB_compatibility::End(), oglplus::DefaultTransformFeedbackOps::End(), oglplus::QueryOps::End(), oglplus::context::StringQueries::Extensions(), oglplus::context::Synchronization::Finish(), oglplus::context::NumericQueries::Flags(), oglplus::context::LimitQueries::FloatLimit(), oglplus::context::Synchronization::Flush(), oglplus::context::Rasterization::FrontFace(), oglplus::context::StringQueries::GetString(), oglplus::ARB_robustness::GraphicsResetStatus(), oglplus::Debug::Group::Group(), oglplus::context::Hints::Hint(), oglplus::ARB_debug_output::InsertMessage(), oglplus::KHR_debug::InsertMessage(), oglplus::Debug::InsertMessage(), oglplus::context::LimitQueries::IntLimit(), oglplus::ShaderOps::IsCompiled(), oglplus::context::Capabilities::IsEnabled(), oglplus::context::Rasterization::LineWidth(), oglplus::ARB_compatibility::LoadIdentity(), oglplus::ARB_compatibility::LoadMatrix(), oglplus::context::LogicalOps::LogicOp(), oglplus::context::LogicalOps::LogicOpMode(), oglplus::Debug::LogSink::LogSink(), oglplus::ARB_debug_output::LogSink::LogSink(), oglplus::KHR_debug::LogSink::LogSink(), oglplus::context::NumericQueries::MajorVersion(), oglplus::ARB_compatibility::MatrixMode(), oglplus::UniformBlockTpl< Unspecified >::MaxIn(), oglplus::context::ViewportOps::MaxViewportDims(), oglplus::context::ViewportOps::MaxViewports(), oglplus::context::Synchronization::MemoryBarrier(), oglplus::Debug::MessageControl(), oglplus::context::NumericQueries::MinorVersion(), oglplus::context::Rasterization::MinSampleShading(), oglplus::context::Drawing::MultiDrawArrays(), oglplus::context::Drawing::MultiDrawArraysIndirect(), oglplus::context::Drawing::MultiDrawElements(), oglplus::context::Drawing::MultiDrawElementsBaseVertex(), oglplus::context::Drawing::MultiDrawElementsIndirect(), oglplus::context::StringQueries::NumExtensions(), oglplus::context::StringQueries::NumShadingLanguageVersions(), oglplus::Debug::ObjectLabel(), oglplus::DefaultTransformFeedbackOps::Pause(), oglplus::DefaultTransformFeedbackOps::Pauser::Pauser(), oglplus::context::Rasterization::PointFadeThresholdSize(), oglplus::context::Rasterization::PointSize(), oglplus::context::Rasterization::PolygonMode(), oglplus::context::Rasterization::PolygonOffset(), oglplus::context::Rasterization::PolygonOffsetFactor(), oglplus::context::Rasterization::PolygonOffsetUnits(), oglplus::ARB_compatibility::PopAttrib(), oglplus::ARB_compatibility::PopClientAttrib(), oglplus::KHR_debug::PopGroup(), oglplus::ShaderOps::PrecisionFormat(), oglplus::context::Drawing::PrimitiveRestartIndex(), oglplus::context::NumericQueries::ProfileMask(), oglplus::context::Rasterization::ProvokingVertex(), oglplus::ARB_compatibility::PushAttrib(), oglplus::ARB_compatibility::PushClientAttrib(), oglplus::KHR_debug::PushGroup(), oglplus::context::BufferSelection::ReadBuffer(), oglplus::UniformBlockTpl< Unspecified >::ReferencedBy(), oglplus::ShaderOps::ReleaseCompiler(), oglplus::ATI_meminfo::RenderbufferFreeMemory(), oglplus::ARB_robustness::ResetNotificationStrategy(), oglplus::QueryOps::Result(), oglplus::QueryOps::ResultAvailable(), oglplus::DefaultTransformFeedbackOps::Resume(), oglplus::DefaultTransformFeedbackOps::Pauser::Resume(), oglplus::context::Rasterization::SampleBuffers(), oglplus::context::Rasterization::SamplePosition(), oglplus::context::Rasterization::Samples(), oglplus::context::ScissorTest::Scissor(), oglplus::context::StringQueries::ShadingLanguageVersion(), oglplus::context::StencilTest::StencilFail(), oglplus::context::StencilTest::StencilFunc(), oglplus::context::StencilTest::StencilFuncSeparate(), oglplus::context::BufferMasking::StencilMask(), oglplus::context::BufferMasking::StencilMaskSeparate(), oglplus::context::StencilTest::StencilOp(), oglplus::context::StencilTest::StencilOpSeparate(), oglplus::context::StencilTest::StencilPassDepthFail(), oglplus::context::StencilTest::StencilPassDepthPass(), oglplus::context::StencilTest::StencilRef(), oglplus::context::StencilTest::StencilValueMask(), oglplus::context::BufferMasking::StencilWriteMask(), oglplus::ARB_debug_output::Synchronous(), oglplus::KHR_debug::Synchronous(), oglplus::Debug::Synchronous(), oglplus::ATI_meminfo::TextureFreeMemory(), oglplus::context::NumericQueries::Timestamp(), oglplus::ShaderOps::Type(), oglplus::VertexArrayOps::Unbind(), oglplus::SamplerOps::Unbind(), oglplus::RenderbufferOps::Unbind(), oglplus::ProgramPipelineOps::Unbind(), oglplus::BufferOps::Unbind(), oglplus::TextureOps::Unbind(), oglplus::BufferOps::UnbindBase(), oglplus::BufferRawMap::Unmap(), oglplus::ProgramOps::Use(), oglplus::NoProgram::Use(), oglplus::ProgramOps::UseNone(), oglplus::ProgramPipelineOps::Validate(), oglplus::ATI_meminfo::VBOFreeMemory(), oglplus::context::ViewportOps::ViewportBoundsRange(), oglplus::Sync::Wait(), oglplus::Debug::Group::~Group(), and oglplus::Debug::LogSink::~LogSink().


Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).