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

[transformations] transformRaw() action gives validation errors. #1644

Closed
Rossko57 opened this issue Sep 13, 2020 · 2 comments · Fixed by #3178
Closed

[transformations] transformRaw() action gives validation errors. #1644

Rossko57 opened this issue Sep 13, 2020 · 2 comments · Fixed by #3178
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@Rossko57
Copy link

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.

@microneer
Copy link

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.

@cweitkamp cweitkamp added the bug An unexpected problem or unintended behavior of the Core label Jun 21, 2021
@J-N-K
Copy link
Member

J-N-K commented May 12, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants