Skip to content

Commit d101636

Browse files
Merge pull request #90 from Raclamusi/improve_error_message
type 判別のエラーメッセージに原因ファイルの情報を追加
2 parents 7b54abb + fcdaac6 commit d101636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crsearch.json/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def identify_type(metas, names, nojump):
324324
# 特殊扱い
325325
return 'article'
326326
else:
327-
raise RuntimeError(f'unexpected meta: {metas}')
327+
raise RuntimeError(f'unexpected meta: {metas}, file: {"/".join(names)}.md')
328328
else:
329329
id_type = metas['id-type'][0]
330330
if id_type in {'class', 'class template'}:
@@ -337,7 +337,7 @@ def identify_type(metas, names, nojump):
337337
elif id_type in {'enum', 'variable', 'type-alias', 'concept', 'named requirement', 'macro', 'namespace', 'cpo'}:
338338
return id_type
339339
else:
340-
raise RuntimeError(f'unexpected meta: {metas}')
340+
raise RuntimeError(f'unexpected meta: {metas}, file: {"/".join(names)}.md')
341341

342342
def make_index(self, md, names, idgen, nojump):
343343
title, contents = self.split_title(md)

0 commit comments

Comments
 (0)