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
One of the things that has always been very challenging when writing rules in openHAB, regardless of the language, is correlating an error/exception that happened in a lambda passed to a timer to the rule that it comes from. For example:
2022-02-11 08:27:51.319 [WARN ] [ore.internal.scheduler.SchedulerImpl] - Scheduled job failed and stopped
org.graalvm.polyglot.PolyglotException: ReferenceError: "item" is not defined
at <js>.:anonymous(<eval>:13) ~[?:?]
at <js>.:anonymous(/openhab/conf/automation/js/node_modules/openhab_rules_tools/timerMgr.js:29) ~[?:?]
at com.oracle.truffle.polyglot.PolyglotFunctionProxyHandler.invoke(PolyglotFunctionProxyHandler.java:154) ~[bundleFile:?]
at com.sun.proxy.$Proxy518.apply(Unknown Source) ~[?:?]
at org.openhab.core.model.script.actions.ScriptExecution.lambda$1(ScriptExecution.java:100) ~[bundleFile:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$12(SchedulerImpl.java:184) ~[?:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$1(SchedulerImpl.java:87) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Is there a way to "tag" the SchedulerRunnable with the ruleUID or even offer an optional creteTimer Action where users can pass their own tag so the SchedulerImpl can amend the error message to include this info. This will greatly improve the ability of users to correlate errors caused by their rules with the actual rule that generates the error.
The text was updated successfully, but these errors were encountered:
One of the things that has always been very challenging when writing rules in openHAB, regardless of the language, is correlating an error/exception that happened in a lambda passed to a timer to the rule that it comes from. For example:
Is there a way to "tag" the
SchedulerRunnable
with the ruleUID or even offer an optionalcreteTimer
Action where users can pass their own tag so the SchedulerImpl can amend the error message to include this info. This will greatly improve the ability of users to correlate errors caused by their rules with the actual rule that generates the error.The text was updated successfully, but these errors were encountered: