Changeset - 92ffad96fd8a
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 11 years ago 2014-06-15 18:04:55
drewp@bigasterisk.com
more error detail on bad expressions
Ignore-this: 684cbe10927c70152bd280e3982028d8
3 files changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/effecteval
Show inline comments
 
@@ -53,6 +53,7 @@ def newEnvelopeCurve(graph, ctx, uri, la
 

	
 
@inlineCallbacks
 
def insertEnvelopePoints(curve):
 
    # wrong: we might not be adding to the currently-playing song.
 
    musicStatus = yield getMusicStatus()
 
    songTime=musicStatus['t']
 
    songDuration=musicStatus['duration']
light9/effecteval/effect.py
Show inline comments
 
@@ -133,7 +133,11 @@ class EffectNode(object):
 
        for c in self.codes:
 
            codeNs = ns.copy()
 
            codeNs.update(c.pyResources)
 
            lineOut = eval(c.expr, codeNs)
 
            try:
 
                lineOut = eval(c.expr, codeNs)
 
            except Exception as e:
 
                e.expr = c.expr
 
                raise e
 
            ns[c.outName] = lineOut
 
        if 'out' not in ns:
 
            log.error("ran code for %s, didn't make an 'out' value", self.uri)
light9/effecteval/effectloop.py
Show inline comments
 
@@ -147,6 +147,8 @@ class EffectLoop(object):
 
            except Exception as exc:
 
                now = time.time()
 
                if now > self.lastErrorLog + 5:
 
                    if hasattr(exc, 'expr'):
 
                        log.error('in expression %r', exc.expr)
 
                    log.error("effect %s: %s" % (e.uri, exc))
 
                    self.lastErrorLog = now
 
        log.debug('eval %s effects, got %s outputs', len(self.currentEffects), len(outputs))
0 comments (0 inline, 0 general)