SKError

public enum SKError : LocalizedError

Undocumented

  • Thrown when a SourceKit request fails.

    The associated value is a representation of the SOURCEKITD_ERROR_*.

    Declaration

    Swift

    case sourceKitRequestFailed(Request.Error)
  • Thrown when an error occurs during the decoding of a value.

    The associated value is a string that describes the error.

    Declaration

    Swift

    case jsonDecodingFailed(String)
  • Thrown when an error occurs during the encoding of a value.

    The associated value is a string that describes the error.

    Declaration

    Swift

    case jsonEncodingFailed(String)
  • Thrown when encoding a JSON string to Data fails.

    Declaration

    Swift

    case jsonDataEncodingFailed
  • Thrown when SourceKitten or the XPC service crashes.

    Declaration

    Swift

    case sourceKittenCrashed
  • Thrown when an unknown error occurs.

    The associated value is a string that describes the error.

    Declaration

    Swift

    case unknown(String)
  • Undocumented

    Declaration

    Swift

    public var localizedDescription: String { get }
  • Declaration

    Swift

    public var errorDescription: String? { get }
  • Creates a SKError.jsonDecodingFailed(_) error from a DecodingError.

    Declaration

    Swift

    public static func jsonDecodingFailed(error: DecodingError) -> SKError

    Parameters

    error

    The decoding error to create an SKError for.

    Return Value

    A SKError.jsonDecodingFailed(_) error created from the error.

  • Creates a SKError.jsonEncodingFailed(_) error from an EncodingError.

    Declaration

    Swift

    public static func jsonEncodingFailed(error: EncodingError) -> SKError

    Parameters

    error

    The encoding error to create an SKError for.

    Return Value

    A SKError.jsonEncodingFailed(_) error created from the error.

  • Creates a SKError.unknown(_) error from an Error.

    Declaration

    Swift

    public static func unknown(error: Error) -> SKError

    Parameters

    error

    The error to create an SKError for.

    Return Value

    A SKError.unknown(_) error created from the error.