[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>pull/17453/head
parent
deca335cef
commit
ab2daded4c
|
@ -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