File: _errors.py

package info (click to toggle)
pyopengl 3.1.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 15,024 kB
  • sloc: python: 108,056; sh: 13; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from OpenGL.error import _ErrorChecker, EGLError
from OpenGL import platform as _p

class EGLError( EGLError ):
    @property 
    def err(self):
        from OpenGL.EGL import debug
        return debug.eglErrorName(self.__dict__.get('err'))
    @err.setter 
    def err(self, value):
        self.__dict__['err'] = value

if _ErrorChecker:
    _error_checker = _ErrorChecker( 
        _p.PLATFORM, 
        _p.PLATFORM.EGL.eglGetError, 
        0x3000, # EGL_SUCCESS,
        errorClass = EGLError,
    )
else:
    _ErrorChecker = None