-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
ScriptProfile: Recover from closed context for JS Scripting #4437
ScriptProfile: Recover from closed context for JS Scripting #4437
Conversation
...ipt/src/main/java/org/openhab/core/automation/module/script/ScriptTransformationService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Florian Hotze <[email protected]>
4793ec9
to
466489d
Compare
Signed-off-by: Florian Hotze <[email protected]>
@J-N-K The ScriptTransformationService should now recover from already closed context. |
...ipt/src/main/java/org/openhab/core/automation/module/script/ScriptTransformationService.java
Outdated
Show resolved
Hide resolved
…a/org/openhab/core/automation/module/script/ScriptTransformationService.java Co-authored-by: J-N-K <[email protected]> Signed-off-by: Florian Hotze <[email protected]>
@J-N-K I addressed your review through GitHub web, FYI DCO is now failing. |
@florian-h05 Evaluating the exception text generated by an external library might fail in the future. Not too bad, but the ISE might be back. Worth to write a test which tries to provoke the ISE and checks the error message? |
That would require to have the JS Scripting add-on available. I don‘t know how feasible that is, never have written an itest in core before. In any case, I should add a comment to the code explaining the message. |
...ipt/src/main/java/org/openhab/core/automation/module/script/ScriptTransformationService.java
Show resolved
Hide resolved
…a/org/openhab/core/automation/module/script/ScriptTransformationService.java Signed-off-by: Florian Hotze <[email protected]>
I will add a comment to JS Scripting‘s POM as a reminder to check if this fix still works when upgrading GraalJS. |
@holgerfriedrich I would merge it as is as I think it would be a larger effort to write an itest including JS Scripting to provoke the exception. |
LGTM. @J-N-K do you want to merge (just asking because of the broken DCO) |
DCO is broken because GitHub web expects my old mail address ([email protected]) (which still works) instead of the new one ([email protected]). |
Refs openhab/openhab-core#4437. Signed-off-by: Florian Hotze <[email protected]>
From time to time, I can see the following exception in my logs: