Improve YAML constructor error message for erroneous !dag_tag
It is very easy to forget the whitespace after a dag_tag constructor, e.g. !dag_prev
. Currently, the error message is somewhat cryptic:
ruamel.yaml.constructor.ConstructorError: could not determine a constructor for the tag '!dag_prev,'
A new user may not be aware of the need for a whitespace (although it is outlined in the docs). It might be nice to catch some common errors (such as forgetting the white space after the !dag_prev
) and output a more useful error message, e.g.:
ruamel.yaml.constructor.ConstructorError: could not determine a constructor for the tag '!dag_prev,'. Make sure to insert a white space after dag_tags, e.g. '!dag_prev '
Edited by Yunus Sevinchan