diff --git a/htsinfer/cli.py b/htsinfer/cli.py index 99cb9ad6..3fea80d4 100644 --- a/htsinfer/cli.py +++ b/htsinfer/cli.py @@ -4,6 +4,7 @@ import argparse import logging from pathlib import Path +from traceback import format_exc from typing import Dict import signal import sys @@ -331,6 +332,11 @@ def main() -> None: LOGGER.error('Execution interrupted.') sys.exit(128 + signal.SIGINT) + except Exception as exc: # pylint: disable=W0703 + LOGGER.error(f"{exc}") + LOGGER.debug(format_exc()) + sys.exit(2) + # conclude execution LOGGER.info("Done") sys.exit(hts_infer.state.value)