You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the following console application by using the latest version of Jurassic (2f1eb7b):
usingSystem;usingJurassic;usingJurassic.Library;namespaceTestJurassicJavaScriptException{classProgram{staticvoidMain(string[]args){varengine=newScriptEngine();varsource=newStringScriptSource(@"function foo(x, y) { var z = x + y; if (z > 20) { bar(); }}(function (foo) { var a = 8; var b = 15; foo(a, b);})(foo);","functions.js");try{engine.Execute(source);}catch(JavaScriptExceptione){Console.WriteLine("During working of JavaScript engine an error occurred.");Console.WriteLine();Console.WriteLine("Message: {0}",e.Message);Console.WriteLine("Name: {0}",e.Name);Console.WriteLine("Source path: {0}",e.SourcePath??"null");Console.WriteLine("Line number: {0}",e.LineNumber);Console.WriteLine("Function name: {0}",e.FunctionName);varerrorValue=e.ErrorObjectasErrorInstance;if(errorValue!=null){Console.WriteLine("Stack: {0}",errorValue.Stack);}}Console.ReadLine();}}}
Then you will see that information about the function where the error occurred is lost.
Hello, Paul!
If you run the following console application by using the latest version of Jurassic (2f1eb7b):
Then you will see that information about the function where the error occurred is lost.
Current version (2f1eb7b):
Previous version (14b9886):
The text was updated successfully, but these errors were encountered: