Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Try catch syntax does not work correctly when using native syntax #263

@ayahito-saji

Description

@ayahito-saji

Hi, I am using JS-interpreter and have observed that the try-catch syntax does not work correctly and stops with an error in the following case.

try {
  new Date(NaN).toISOString();
} catch (e) {
  alert("caught");
}

I am guessing the cause is that this program is using the native toISOString() and the error occurs outside of the interpreter (native). These errors need to be propagated inside the interpreter, or to be raised internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions