Ejemplo n.º 1
0
def draw():
    try:
        if profiler.active():
            profiler.accum('_draw()', globals(), locals())
        else:
            _draw()
    except StandardError:
        log.error('gl.draw', exc_info=True)
Ejemplo n.º 2
0
def draw():
    try:
        if profiler.active():
            profiler.accum('_draw()', globals(), locals())
        else:
            _draw()
    except Exception:
        log.error('gl.draw', exc_info=True)
Ejemplo n.º 3
0
def draw(productionRender=False):
    try:
        if profiler.active():
            profiler.accum('_draw()', globals(), locals())
        else:
            _draw(productionRender)
        return True
    except Exception:
        log.error('gl.draw', exc_info=True)
        return False
Ejemplo n.º 4
0
def draw(productionRender = False):
    try:
        if profiler.active():
            profiler.accum('_draw()', globals(), locals())
        else:
            _draw(productionRender)
        return True
    except StandardError:
        log.error('gl.draw', exc_info=True)
        return False
Ejemplo n.º 5
0
 def callEvent(self, eventType, event):
     if not hasattr(self, eventType):
         return False
     topLevel = EventHandler._depth == 0
     EventHandler._depth += 1
     try:
         self._logger.debug('callEvent[%d]: %s.%s(%s)', self._depth, self, eventType, event)
         method = getattr(self, eventType)
         if topLevel and profiler.active():
             profiler.accum('method(event)', globals(), locals())
         else:
             method(event)
     except Exception, e:
         log.warning('Exception during event %s', eventType, exc_info=True)
Ejemplo n.º 6
0
 def callEvent(self, eventType, event):
     if not hasattr(self, eventType):
         return False
     topLevel = EventHandler._depth == 0
     EventHandler._depth += 1
     try:
         self._logger.debug('callEvent[%d]: %s.%s(%s)', self._depth, self, eventType, event)
         method = getattr(self, eventType)
         if topLevel and profiler.active():
             profiler.accum('method(event)', globals(), locals())
         else:
             method(event)
     except Exception as _:
         log.warning('Exception during event %s', eventType, exc_info=True)
         self.eventFailed(EventHandler._depth)
     EventHandler._depth -= 1
     if topLevel:
         self._logger.debug('callEvent: done')
         if G.app:
             G.app.redraw()
         return True
     return False