From 2f653c966e7775648fba3efc57100d3b7cff4762 Mon Sep 17 00:00:00 2001 From: Nick Winter <livelily@gmail.com> Date: Tue, 4 Mar 2014 08:30:50 -0800 Subject: [PATCH] Simulator now swaps in empty methods when code doesn't compile. --- app/lib/simulator/Simulator.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/simulator/Simulator.coffee b/app/lib/simulator/Simulator.coffee index 521e810c7..f92bccb98 100644 --- a/app/lib/simulator/Simulator.coffee +++ b/app/lib/simulator/Simulator.coffee @@ -207,7 +207,12 @@ module.exports = class Simulator transpileSpell: (thang, spellKey, methodName) -> slugifiedThangID = _.string.slugify thang.id source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? "" - @spells[spellKey].thangs[thang.id].aether.transpile source + aether = @spells[spellKey].thangs[thang.id].aether + try + aether.transpile source + catch e + console.log "Couldn't transpile #{spellKey}:\n#{source}\n", e + aether.transpile '' createAether: (methodName, method) -> aetherOptions =