ExitCode
An error type that only includes an exit code.
struct ExitCode
If you’re printing custom error messages yourself, you can throw this error to specify the exit code without adding any additional output to standard out or standard error.
An error type that only includes an exit code.
struct ExitCode
If you’re printing custom error messages yourself, you can throw this error to specify the exit code without adding any additional output to standard out or standard error.
import ArgumentParser
Straightforward, type-safe argument parsing for Swift.
Provide helpful feedback to users when things go wrong.
struct ValidationError
An error type that is presented to the user as an error with parsing their command-line input.
struct CleanExit
An error type that represents a clean (i.e. non-error state) exit of the utility.
protocol Equatable
A type that can be compared for value equality.
protocol Error : Sendable
A type representing an error value that can be thrown.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
init(_ code: Int32)
Creates a new ExitCode
with the given code.
init(rawValue: Int32)
static let failure: ExitCode
An exit code that indicates that the command failed.
static let success: ExitCode
An exit code that indicates successful completion of a command.
static let validationFailure: ExitCode
An exit code that indicates that the user provided invalid input.
var isSuccess: Bool { get }
A Boolean value indicating whether this exit code represents the successful completion of a command.
var rawValue: Int32
The exit code represented by this instance.
var hashValue: Int { get }
var localizedDescription: String { get }
Retrieve the localized description for this error.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)