OpenGL.error
index
/home/mcfletch/pylive/OpenGL/error.py

Implementation of OpenGL errors/exceptions
 
Note that OpenGL-ctypes will also throw standard errors,
such as TypeError or ValueError when appropriate.
 
ErrorChecker is an _ErrorChecker instance that allows you
to register a new error-checking function for use 
throughout the system.

 
Modules
       
OpenGL
OpenGL.acceleratesupport
logging
OpenGL.platform

 
Classes
       
Exception(BaseException)
Error
CopyError
GLError
GLError
GLUError
GLUError
GLUTError
GLUTError
NoContext
NullFunctionError

 
class CopyError(Error)
    Raised to indicate that operation requires data-copying
 
if you set:
    OpenGL.ERROR_ON_COPY = True 
 
before importing OpenGL.GL, this error will be raised when 
a passed argument would require a copy to be made.
 
 
Method resolution order:
CopyError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class Error(Exception)
    Base class for all PyOpenGL-specific exception classes
 
 
Method resolution order:
Error
Exception
BaseException
object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class GLError(Error)
    OpenGL core error implementation class
 
Primary purpose of this error class is to allow for 
annotating an error with more details about the calling 
environment so that it's easier to debug errors in the
wrapping process.
 
Attributes:
 
    err -- the OpenGL error code for the error 
    result -- the OpenGL result code for the operation
    baseOperation -- the "function" being called
    pyArgs -- the translated set of Python arguments
    cArgs -- the Python objects matching 1:1 the C arguments
    cArguments -- ctypes-level arguments to the operation,
        often raw integers for pointers and the like
    description -- OpenGL description of the error (textual)
 
 
Method resolution order:
GLError
Error
Exception
BaseException
object

Methods defined here:
__init__(self, err=None, result=None, cArguments=None, baseOperation=None, pyArgs=None, cArgs=None, description=None)
Initialise the GLError, storing metadata for later display
__repr__(self)
Produce a much shorter version of the error as a string
__str__(self)
Create a fully formatted representation of the error
format_baseOperation(self, property, value)
Format a baseOperation reference for display
format_description(self, property, value)
Format description using GLU's gluErrorString
shortRepr(self, value, firstLevel=True)
Retrieve short representation of the given value

Data and other attributes defined here:
DISPLAY_ORDER = ('err', 'description', 'baseOperation', 'pyArgs', 'cArgs', 'cArguments', 'result')

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class GLUError(Error)
    GLU error implementation class
 
 
Method resolution order:
GLUError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class GLUTError(Error)
    GLUT error implementation class
 
 
Method resolution order:
GLUTError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
GLUTerror = class GLUTError(Error)
    GLUT error implementation class
 
 
Method resolution order:
GLUTError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
GLUerror = class GLUError(Error)
    GLU error implementation class
 
 
Method resolution order:
GLUError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
GLerror = class GLError(Error)
    OpenGL core error implementation class
 
Primary purpose of this error class is to allow for 
annotating an error with more details about the calling 
environment so that it's easier to debug errors in the
wrapping process.
 
Attributes:
 
    err -- the OpenGL error code for the error 
    result -- the OpenGL result code for the operation
    baseOperation -- the "function" being called
    pyArgs -- the translated set of Python arguments
    cArgs -- the Python objects matching 1:1 the C arguments
    cArguments -- ctypes-level arguments to the operation,
        often raw integers for pointers and the like
    description -- OpenGL description of the error (textual)
 
 
Method resolution order:
GLError
Error
Exception
BaseException
object

Methods defined here:
__init__(self, err=None, result=None, cArguments=None, baseOperation=None, pyArgs=None, cArgs=None, description=None)
Initialise the GLError, storing metadata for later display
__repr__(self)
Produce a much shorter version of the error as a string
__str__(self)
Create a fully formatted representation of the error
format_baseOperation(self, property, value)
Format a baseOperation reference for display
format_description(self, property, value)
Format description using GLU's gluErrorString
shortRepr(self, value, firstLevel=True)
Retrieve short representation of the given value

Data and other attributes defined here:
DISPLAY_ORDER = ('err', 'description', 'baseOperation', 'pyArgs', 'cArgs', 'cArguments', 'result')

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class NoContext(Error)
    Raised to indicate that there is no currently active context
 
Technically almost *any* OpenGL call can segfault if there is 
no active context.  The OpenGL.CHECK_CONTEXT flag, if enabled 
will cause this error to be raised whenever a GL or GLU call is 
issued (via PyOpenGL) if there is no currently valid context.
 
 
Method resolution order:
NoContext
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
class NullFunctionError(Error)
    Error raised when an undefined function is called
 
 
Method resolution order:
NullFunctionError
Error
Exception
BaseException
object

Data descriptors inherited from Error:
__weakref__
list of weak references to the object (if defined)

Methods inherited from Exception:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Exception:
__new__ = <built-in method __new__ of type object at 0x8108c0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__str__(...)
x.__str__() <==> str(x)
__unicode__(...)

Data descriptors inherited from BaseException:
__dict__
args
message

 
Functions
       
glCheckError(...)
Base GL Error checker compatible with new ctypes errcheck protocol
 
This function will raise a GLError with just the calling information
available at the C-calling level, i.e. the error code, cArguments,
baseOperation and result.  Higher-level code is responsible for any 
extra annotations.
 
Note:
        glCheckError relies on glBegin/glEnd interactions to 
        prevent glGetError being called during a glBegin/glEnd 
        sequence.  If you are calling glBegin/glEnd in C you 
        should call onBegin and onEnd appropriately.
onBegin(...)
Called by glBegin to record the fact that glGetError won't work
onEnd(...)
Called by glEnd to record the fact that glGetError will work

 
Data
        ErrorChecker = <OpenGL_accelerate.errorchecker._ErrorChecker object at 0x21b4ef0>
__all__ = ('Error', 'GLError', 'GLUError', 'GLUTError', 'glCheckError', 'GLerror', 'GLUerror', 'GLUTerror')
__file__ = '/home/mcfletch/pylive/OpenGL/error.pyc'
__name__ = 'OpenGL.error'
__package__ = 'OpenGL'
log = <logging.Logger instance at 0x21b4b00>