diff options
author | Eric Blake <eblake@redhat.com> | 2015-10-12 22:22:32 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-10-15 08:39:08 +0200 |
commit | 99df5289d8c7ebf373c3570d8fba3f3a73360281 (patch) | |
tree | 13fee73ef26c046ad443045e13b6e86a871c87f0 /blockdev-nbd.c | |
parent | 46292ba75c515baf733df18644052b2ce9492728 (diff) |
qapi: Track location that created an implicit type
A future patch will move some error checking from the parser
to the various QAPISchema*.check() methods, which run only
after parsing completes. It will thus be possible to create
a python instance representing an implicit QAPI type that
parses fine but will fail validation during check(). Since
all errors have to have an associated 'info' location, we
need a location to be associated with those implicit types.
The intuitive info to use is the location of the enclosing
entity that caused the creation of the implicit type.
Note that we do not anticipate builtin types being used in
an error message (as they are not part of the user's QAPI
input, the user can't cause a semantic error in their
behavior), so we exempt those types from requiring info, by
setting a flag to track the completion of _def_predefineds(),
and tracking that flag in _def_entity().
No change to the generated code.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1444710158-8723-13-git-send-email-eblake@redhat.com>
[Missing QAPISchemaArrayType.is_implicit() supplied]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'blockdev-nbd.c')
0 files changed, 0 insertions, 0 deletions