The error message from 'json-c' was passed along without any libvirt
string which makes it hard to find in the source and isn't exactly clear
when present in logs:
libvirtd[843]: internal error : invalid utf-8 string
Prefix the message with 'failed to parse JSON'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
jerr = json_tokener_get_error(tok);
if (jerr != json_tokener_success) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", json_tokener_error_desc(jerr));
+ _("failed to parse JSON: %1$s"),
+ json_tokener_error_desc(jerr));
goto cleanup;
}
ret = virJSONValueFromJsonC(jobj);