[Trivial Fix] Add document layer to error message output
The document layer that is invalid should be included in the exception called InvalidDocumentLayer for obvious reasons. Change-Id: Ie7fcecc96bc7667530959af34ec146b4e4a47303
This commit is contained in:
parent
113365f552
commit
99ab93727b
|
@ -303,6 +303,7 @@ class DocumentLayering(object):
|
||||||
document.schema, document.name,
|
document.schema, document.name,
|
||||||
self._layering_policy.layer_order)
|
self._layering_policy.layer_order)
|
||||||
raise errors.InvalidDocumentLayer(
|
raise errors.InvalidDocumentLayer(
|
||||||
|
document_layer=document.layer,
|
||||||
document_schema=document.schema,
|
document_schema=document.schema,
|
||||||
document_name=document.name,
|
document_name=document.name,
|
||||||
layer_order=', '.join(
|
layer_order=', '.join(
|
||||||
|
|
|
@ -187,9 +187,10 @@ class InvalidDocumentLayer(DeckhandException):
|
||||||
* Check that the document layer is contained in the layerOrder in the
|
* Check that the document layer is contained in the layerOrder in the
|
||||||
registered LayeringPolicy in the system.
|
registered LayeringPolicy in the system.
|
||||||
"""
|
"""
|
||||||
msg_fmt = ("Invalid layer for document [%(document_schema)s] "
|
msg_fmt = ("Invalid layer '%(document_layer)s' for document "
|
||||||
"%(document_name)s was not found in layerOrder %(layer_order)s "
|
"[%(document_schema)s] %(document_name)s was not found in "
|
||||||
"for provided LayeringPolicy %(layering_policy_name)s.")
|
"layerOrder: %(layer_order)s for provided LayeringPolicy: "
|
||||||
|
"%(layering_policy_name)s.")
|
||||||
code = 400
|
code = 400
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue