mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 14:33:37 -08:00
feat: catch parser errors when using parse CLI
This commit is contained in:
@@ -302,7 +302,10 @@ def metaverif(repo_path, tmpdir, file):
|
|||||||
@main.command()
|
@main.command()
|
||||||
@click.argument("file_path")
|
@click.argument("file_path")
|
||||||
def parse(file_path):
|
def parse(file_path):
|
||||||
|
try:
|
||||||
parse_main(file_path)
|
parse_main(file_path)
|
||||||
|
except pkgs.lark.exceptions.UnexpectedCharacters as e:
|
||||||
|
logger.error(f"Error {type(e).__name__} parsing {file_path}: {e}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user