StikJIT/Sources/StikJITError.swift
Stephen 99f2db2161 Initial commit
Initial commit
2026-06-23 12:17:03 -04:00

25 lines
775 B
Swift

import Foundation
public enum StikJITError: Error, LocalizedError {
case pairingFile(String)
case scriptUnavailable
case debugProxyUnavailable
case device(code: Int32, subCode: Int32, message: String)
public var errorDescription: String? {
switch self {
case .pairingFile(let detail):
return "Pairing file error: \(detail)."
case .scriptUnavailable:
return "The bundled universal.js could not be loaded from the StikJIT framework."
case .debugProxyUnavailable:
return "Failed to establish a debugserver connection to the target process."
case .device(let code, let subCode, let message):
return "\(message) (idevice code \(code)/\(subCode))."
}
}
}