paulbartrum / jurassic

A .NET library to parse and execute JavaScript code.
MIT License
873 stars 122 forks source link

Error emit for "'{0}' is not a function" does not use OptimizationInfo #81

Closed kpreisser closed 7 years ago

kpreisser commented 7 years ago

Hi,

when running the following Script in the ScriptEngine:

try {
    null();
} catch (e) {
    console.log(e.stack);
}

it prints:

 TypeError: 'null' is not a function

instead of:

 TypeError: 'null' is not a function
    at unknown:2

as the EmitThrow in FunctionCallExpression does not use the OptimizationInfo.

paulbartrum commented 7 years ago

Thanks, I merged your PR :-)