catch_and_exit

lsst.daf.butler.cli.utils.catch_and_exit(func: Callable) Callable

Catch all exceptions, prints an exception traceback and signals click to exit.

Use as decorator.

Parameters:
funccollections.abc.Callable

The function to be decorated.

Returns:
collections.abc.Callable

The decorated function.