Skip to content

Commit 316e5ae

Browse files
committed
Replace full YAML block by element ID in the YAML parse error message
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
1 parent 36d33e1 commit 316e5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/internal/YamlModelRepositoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ private <T extends YamlElement> List<T> parseJsonMapNode(@Nullable JsonNode mapN
784784
elt.setId(id);
785785
} catch (JsonProcessingException e) {
786786
if (errors != null) {
787-
errors.add("could not parse element %s to %s: %s".formatted(node.toPrettyString(),
787+
errors.add("could not parse element with ID %s to %s: %s".formatted(id,
788788
elementClass.getSimpleName(), e.getMessage()));
789789
}
790790
}

0 commit comments

Comments
 (0)