def decorate_docopt_usage(func):

    @wraps(func)
    def wrapper(*args, **kwargs):
        try:
            result = func(*args, **kwargs)
        except docopt.DocoptExit as e:
            emitter.publish("Command not recognized\n")
            emitter.publish(e)
            return 1
        return result
    return wrapper
Handle DocoptExit exception
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/util.py/decorate_docopt_usage