]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virJSONValueFromString: Prefix error message from 'json-c'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 25 Oct 2024 14:12:50 +0000 (16:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 1 Nov 2024 14:51:53 +0000 (15:51 +0100)
commit354a3d2be4c37e9f9732dfb154f31700e27b676f
treedab19b7809d9b05b7cc336b53918a0c83dce1d55
parente71a510605f13c7701a4f0b4911973d32bb2eb02
virJSONValueFromString: Prefix error message from 'json-c'

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>
src/util/virjson.c