AnonymousError

public enum AnonymousError : Error
extension AnonymousError: Equatable
extension AnonymousError: LocalizedError

An error without context that optionally wraps a String.

  • An anonymous error with no message.

    Declaration

    Swift

    case blank
  • An anonymous error with a message.

    Declaration

    Swift

    case withMessage(String)
  • Creates an anonymous error

    Declaration

    Swift

    public init(string: String)

    Parameters

    string

    The string that the error wraps. If the string is empty, creates a blank error.

  • Declaration

    Swift

    public var errorDescription: String? { get }