OGLplus (0.30.0) a C++ wrapper for OpenGL

Exception class for general OpenGL errors. More...

#include </home/chochlik/devel/oglplus/include/oglplus/error.hpp>

Inheritance diagram for oglplus::Error:

List of all members.

Public Types

typedef std::map< String, StringPropertyMap
 A map of properties attached to the exception.
typedef std::list< ErrorInfoPropagationInfoList
 List of ErrorInfo objects marking exception trace points.

Public Member Functions

GLenum Code (void) const
 Returns the OpenGL error code.
const ErrorInfoThrowInfo (void) const
 Returns information about the throw site of the exception.
const char * GLSymbol (void) const
 Returns the name of the symbol or constant related to the error.
const char * File (void) const
 Returns the path of the source file where the exception originated.
const char * Func (void) const
 Returns the name of the function where the exception originated.
unsigned Line (void) const
 Returns the line in the source file where the exception originated.
const char * ClassName (void) const
 Returns the class name of the object that caused the exception.
const char * BindTarget (void) const
 Returns the name of the binding point that caused the exception.
const StringObjectDescription (void) const
 Returns the description of the object that caused the exception.
PropertyMap Properties (void) const
 Returns the properties of the exception.
void SetPropertyValue (const String &key, const String &value)
 Set a property key/value to the exception.
PropagationInfoList PropagationInfo (void) const
 Returns a list of ErrorInfo objects marking exception trace points.

Static Public Member Functions

template<typename Key , typename Value >
static void AddPropertyValue (PropertyMapInit &properties, Key &&key, Value &&value)
 Set a property key/value to the property map.

Detailed Description

Exception class for general OpenGL errors.

Instances of this exception class are throws whenever an error is detected during the execution of OpenGL API calls in the OGLplus code. There are several other classes derived for more specific error types, like GL shading language compilation and linking errors, out-of-memory errors, etc. This class is derived from the standard runtime_error exception and thus the basic error message can be obtained by calling its what() member function.

Examples:
standalone/001_ati_meminfo.cpp, standalone/001_program_resources.cpp, standalone/001_triangle_glut_glew.cpp, standalone/001_triangle_sdl_glew.cpp, standalone/001_triangle_wxgl_glew.cpp, standalone/002_amd_perf_monitor.cpp, standalone/002_rectangle_glut_glew.cpp, and standalone/002_triangle_compatibility.cpp.

Member Function Documentation

GLenum oglplus::Error::Code ( void  ) const

Returns the OpenGL error code.

This is basically the value of error code returned by the glGetError functions.

See also:
ThrowInfo
File
Func
Line
ClassName
ObjectDescription
const char* oglplus::Error::Func ( void  ) const

Returns the name of the function where the exception originated.

See also:
ThrowInfo
GLSymbol
Code
File
Line
ClassName
ObjectDescription

References oglplus::ErrorFunc().

const char* oglplus::Error::GLSymbol ( void  ) const

Returns the name of the symbol or constant related to the error.

This function returns the name of the failed OpenGL function without the gl prefix in case of a function error or the name of the OpenGL constant (usually a implementation-dependent) limit which are related to the error.

See also:
ThrowInfo
Code
Func
File
Line
ClassName
ObjectDescription
Examples:
standalone/001_ati_meminfo.cpp, standalone/001_program_resources.cpp, standalone/001_triangle_glut_glew.cpp, standalone/001_triangle_sdl_glew.cpp, standalone/001_triangle_wxgl_glew.cpp, standalone/002_amd_perf_monitor.cpp, standalone/002_rectangle_glut_glew.cpp, and standalone/002_triangle_compatibility.cpp.

References oglplus::ErrorGLSymbol().

Returns a list of ErrorInfo objects marking exception trace points.

See also:
OGLPLUS_ERROR_NO_PROPAGATION_INFO

Returns the properties of the exception.

See also:
OGLPLUS_ERROR_NO_PROPERTIES
Examples:
standalone/001_triangle_wxgl_glew.cpp.
const ErrorInfo& oglplus::Error::ThrowInfo ( void  ) const

Returns information about the throw site of the exception.

See also:
GLSymbol
Code
File
Func
Line
ClassName
ObjectDescription

The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/error.hpp

Copyright © 2010-2013 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Tue May 7 2013 by Doxygen (version 1.7.6.1).