]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qapi: Fix a misleading parser error message
authorMarkus Armbruster <armbru@redhat.com>
Wed, 15 Mar 2017 12:57:36 +0000 (13:57 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 16 Mar 2017 06:13:04 +0000 (07:13 +0100)
When choking on a token where an expression is expected, we report
'Expected "{", "[" or string'.  Close, but no cigar.  Fix it to
Expected '"{", "[", string, boolean or "null"'.

Missed in commit e53188a.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-48-git-send-email-armbru@redhat.com>

scripts/qapi.py
tests/qapi-schema/trailing-comma-list.err

index d19300d657c069693e627d7273e1264bd577c5f1..e88c047c2e1f43ce399ed5db4abb8ba5a79a2798 100644 (file)
@@ -519,7 +519,8 @@ class QAPISchemaParser(object):
             expr = self.val
             self.accept()
         else:
-            raise QAPIParseError(self, 'Expected "{", "[" or string')
+            raise QAPIParseError(self, 'Expected "{", "[", string, '
+                                 'boolean or "null"')
         return expr
 
     def get_doc(self, info):
index 24c24b01088b123b75143f8e56285ea10cb17ec8..212e14ae28efbdf4089082841294cfb526f63ab3 100644 (file)
@@ -1 +1 @@
-tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[" or string
+tests/qapi-schema/trailing-comma-list.json:2:36: Expected "{", "[", string, boolean or "null"