Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly throws exception for the same code #101

Open
dnVanz opened this issue Jul 24, 2022 · 0 comments
Open

Randomly throws exception for the same code #101

dnVanz opened this issue Jul 24, 2022 · 0 comments

Comments

@dnVanz
Copy link

dnVanz commented Jul 24, 2022

Hi,

I've got the following code

`string code = "function imageUrl(){ if(seasonType==="summer"){ return "https://i.ibb.co/P9Sz25M/summer.jpg\"; } if(seasonType==="winter"){ return "https://cdn.pixabay.com/photo/2018/11/22/12/48/clothing-3831823_1280.jpg\"; } if(seasonType==="spring"){ return "https://cdn.pixabay.com/photo/2016/11/16/03/55/blue-1828094_1280.jpg\"; } }; imageUrl();";

var javascriptContext = new JavascriptContext();
javascriptContext.SetParameter("seasonType", "summer");
var expressionJSResult = javascriptContext.Run(code);
javascriptContext.Dispose();
Console.WriteLine(expressionJSResult.ToString());`

My issue is that when the same code is run it works sometimes and sometimes it throws the below exception.

at Noesis.Javascript.CompileScript(Local<v8::Script>* , Char* source_code, Char* resource_name) at Noesis.Javascript.JavascriptContext.Run(String iSourceCode) at Program.<Main>$(String[] args)

Appreciate any help on this. I'm using .Net version 4.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant