public static CliError wrap(Throwable e) {
        if (e instanceof CliError) {
            return (CliError) e;
        } else {
            return new CliError(e.getMessage(), 1, e);
        }
    }
Wraps the given exception in a CliError (no wrapping is performed
if the given exception is an instance of CliError).

@param e Exception to wrap.
@return Returns the wrapped exception.
smithy-cli/src/main/java/software/amazon/smithy/cli/CliError.java