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

Prevent crash on invalid entry in ManagedThingProvider #3053

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Jul 29, 2022

Invalid entries in the database (e.g. duplicate channels) can throw an uncatched exception which prevents adding things from storage to the ThingRegistry. This PR adds a try-catch-block around the thing mapping and logs a warning. As a result only the affected thing will be missing.

Reported on the forum: https://community.openhab.org/t/issues-with-3-3-on-win10/137734

Signed-off-by: Jan N. Klug github@klug.nrw

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Jul 29, 2022
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/issues-with-3-3-on-win10/137734/48

@J-N-K J-N-K marked this pull request as ready for review July 29, 2022 19:30
@J-N-K J-N-K requested a review from a team as a code owner July 29, 2022 19:30
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@wborn wborn merged commit 6c9b767 into openhab:main Aug 22, 2022
@wborn wborn added this to the 3.4 milestone Aug 22, 2022
@J-N-K J-N-K deleted the bug-managedthingprovider branch August 22, 2022 16:14
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: 6c9b767
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 this pull request may close these issues.

3 participants