Just FYI, LiveScript has object comprehensions
D = (obj, l = 20) ->
if l > 0
{[k, try D(v, l - 1) catch => e] for k, v of obj}
else
obj
so, the answer is that catch (e) e
is not valid in LS because LS allowed expressions as catchee for destructuring (catch {msg}
) which means you must pass it a block catch => e
(the e
is implicit, but you can make it explicit : catch e => e
).