openhab-core
openhab-core copied to clipboard
[transformations] transformRaw() action gives validation errors.
openHAB 2.5.0
Use of
var blah = transformRaw("xx","yy","zz")
in DSL rules throws a validation error at load time in openhab.log
2020-09-13 22:47:41.089 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'doors.rules', using it anyway: The method transformRaw(String, String, String) from the type Transformation refers to the missing type Object
The function does seem to work as expected at runtime.
VSCode syntax highlighter doesn't like it either, but I expect that comes from the same root cause.
I have also found this validation error, in 3.1.0.M3. However, I also have the problem that, contrary to the docs, the exception isn't being thrown - I still get a warning in the logs and the catch block is never run.
The reason is that transformRaw
throws TransformationException
and that is unavailable in rules. Because of that the try-catch is also not working if it catches TransformationException
but works if it catches Exception
.
That might be related to a name-clash between org.openhab.core.transform.TransformationException
and org.eclipse.xtext.xtext.ecoreInference.TransformationException
. Did this ever work?