#NEWLINE# def catch_errors( f ) : #NEWLINE# #INDENT# @ functools . wraps ( f ) #NEWLINE# def inner( * args , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return f ( * args , ** kwargs ) #NEWLINE# #UNINDENT# except CliError as e : #NEWLINE# #INDENT# print ( str ( e ) ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# #UNINDENT# return f