diff --git a/jc/cli.py b/jc/cli.py index c8f8c33a..7514dcb9 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -136,11 +136,11 @@ def main(): for arg in sys.argv: if arg in parser_map: try: - parser_name = arg.lstrip('--') result = parser_map[arg](data, raw=raw, quiet=quiet) found = True break except: + parser_name = arg.lstrip('--') jc.utils.error_message(f'{parser_name} parser could not parse the input data. Did you use the correct parser?\n For details use the -d option.') exit(1)