-
Notifications
You must be signed in to change notification settings - Fork 64
[Console] Fail to throw exception when output an undefined value #566
Comments
Maybe this is a good thing. ;) Worth looking into, maybe we're squashing all exceptions somehow? |
I do see this behavior, whether or not its a bug is up in the air. I think it could be a potential JerryScript issue. The reason that calling
The question is, are we doing this correctly? I am not sure about that. This is how we do it everywhere else in the code, but perhaps this check won't catch syntax/parse/reference errors. The return value may just be related to errors thrown during runtime. |
@grgustaf, can this be closed now that we added JS error printing to callbacks/main. Its the best we can do given the situation, since there is no way to actually throw an error (since its in the main loop). |
Verified with commit b29dbbc on Arduino 101.
Run:
Output:
|
Closed since JS error printing is added to callbacks/main |
If we only run
console.log(a);
, it will outputJerryScript: cannot run javascript
due to 'a' is undefined. But addingconsole.log(a)
in setTimeout() and setInterval(), no exception thrown on both Arduino 101 and FRDM-K64F.But using the same code on chrome, it will throw exception like this:
Uncaught ReferenceError: a is not defined
The text was updated successfully, but these errors were encountered: