From fab12376d0234ce46517f88b9ecc9a6080522118 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 27 Sep 2019 15:46:35 +0200 Subject: qapi: Improve reporting of invalid 'if' further check_if()'s errors don't point to the offending part of the expression. For instance: tests/qapi-schema/alternate-branch-if-invalid.json:2: 'if' condition ' ' makes no sense Other check_FOO() do, with the help of a @source argument. Make check_if() do that, too. The example above improves to: tests/qapi-schema/alternate-branch-if-invalid.json:2: 'if' condition ' ' of 'data' member 'branch' makes no sense Signed-off-by: Markus Armbruster Message-Id: <20190927134639.4284-23-armbru@redhat.com> Reviewed-by: Eric Blake --- tests/qapi-schema/enum-if-invalid.err | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/qapi-schema/enum-if-invalid.err') diff --git a/tests/qapi-schema/enum-if-invalid.err b/tests/qapi-schema/enum-if-invalid.err index db9eb45b25..30c1f0e91c 100644 --- a/tests/qapi-schema/enum-if-invalid.err +++ b/tests/qapi-schema/enum-if-invalid.err @@ -1,2 +1,2 @@ tests/qapi-schema/enum-if-invalid.json: In enum 'TestIfEnum': -tests/qapi-schema/enum-if-invalid.json:2: 'if' condition must be a string or a list of strings +tests/qapi-schema/enum-if-invalid.json:2: 'if' condition of 'data' member 'bar' must be a string or a list of strings -- cgit 1.4.1