Functions

The following functions are available globally.

  • Fail, print the error message and exit the application Call this method when you want to exit and print an error message

    Declaration

    Swift

    public func fail(statusCode: Int, errorMessage: String) -> Never

    Parameters

    statusCode

    the status code to report

    errorMessage

    additional error message to print

  • Fail, print the help message and exit the application Call this method when you want to exit and print the help message

    Declaration

    Swift

    public func fail(statusCode: Int, command: Command) -> Never

    Parameters

    statusCode

    the status code to report

    command

    the command whose help message should be printed