-
• #2
You mean this one? http://forum.espruino.com/conversations/349399/#comment15351284
Maybe @Michaelnik can provide some code.
-
• #3
Thanks! Looks like my google skills failed me then :)
I'd got it happening myself when trying to do the new "Espruino Control" app, so it might be related to the bluetooth code more than a language issue
-
• #4
Ok, great! Narrowed it down to:
//E.setFlags({pretokenise:0}) // this fixes it function go() { Promise.resolve().then(function() { console.log("Ok"); }).catch(function(e) { console.log("ERROR",e); }); } go()
So it's to do with
catch
being converted to a token even though in this case it's just a function name. Just filed an issue: https://github.com/espruino/Espruino/issues/1868
I've noticed this error pop up in 2v06 (I think as a side effect of pretokenise being enabled by default on 2v06). I seem to remember seeing a thread with an example of it recently, but I can't find it now.
If you encounter this, please can you post up the code that caused the error? Ideally stripped down to a minimum. It might help to track it down.
Thanks!