mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[mqtt.homeassistant] Include the details of JSON syntax errors when parsing fails (#17452)
While it's useful in general to not have to copy/paste a MQTT message into a JSON parser to verify syntax, it also includes details about fields that are the wrong data type that a generic JSON parser won't catch. A la #17375. Signed-off-by: Cody Cutrer <cody@cutrer.us> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
522b33cc9a
commit
48c96f98c8
@ -226,7 +226,7 @@ public abstract class AbstractChannelConfiguration {
|
||||
}
|
||||
return config;
|
||||
} catch (JsonSyntaxException e) {
|
||||
throw new ConfigurationException("Cannot parse channel configuration JSON", e);
|
||||
throw new ConfigurationException("Cannot parse channel configuration JSON: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user