I posted this because to make user's aware of the fact that error messages caused in compiled code dont reference the compiled code. The reference points to the 'last' layer of interpreted code.
The error message is also different when invoking from with in an function o r invoking from the console directly:
Error message created on invocation of compiled code within a function().
>len();
undefined
=undefined
Uncaught Error: Function not found!
at line 3 col 20
console.log(lenc());
^
in function "len" called from line 1 col 5
len();
^
>
Error message created on diret invocation of compiled code from console.
>lenc("abc");
=undefined
Uncaught Error: Expecting a function to call, got Number
at line 1 col 11
lenc("123.456");
^
>
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I posted this because to make user's aware of the fact that error messages caused in compiled code dont reference the compiled code. The reference points to the 'last' layer of interpreted code.
The error message is also different when invoking from with in an function o r invoking from the console directly:
Error message created on invocation of compiled code within a function().
Error message created on diret invocation of compiled code from console.