Add position location for YAML parsing errors

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2022-01-25 10:17:29 -06:00
parent 54dc67b0d3
commit d86d85a182
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -165,7 +165,7 @@ class NFDocs(Directive):
docstrings[proc_type][proc_name] = yaml.safe_load(doc_yaml) docstrings[proc_type][proc_name] = yaml.safe_load(doc_yaml)
except: except:
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
logger.warning(f"Could not parse YAML for {proc_name}") logger.warning(f"Could not parse YAML for {proc_name} ({f}:{pos})")
# Try to convert each definition to a node # Try to convert each definition to a node
for block_type, block_docs in docstrings.items(): for block_type, block_docs in docstrings.items():