Files
onnxruntime-swift-package-m…/swift/OnnxRuntimeBindings/ORTError.swift
T
izackp 2af97cc6bf
CodeQL Advanced / Analyze (swift) (push) Has been cancelled
Replace Objective-C bridge with Swift ONNX runtime backend
2026-06-09 09:38:43 -04:00

22 lines
676 B
Swift

import Foundation
public enum ORTError: Error, LocalizedError {
case notImplemented(String)
case runtimeFailure(action: String, message: String)
case invalidArgument(String)
case unsupported(String)
public var errorDescription: String? {
switch self {
case .notImplemented(let symbol):
return "ONNX Runtime Swift interface symbol is not implemented yet: \(symbol)"
case .runtimeFailure(let action, let message):
return "\(action) failed: \(message)"
case .invalidArgument(let message):
return message
case .unsupported(let message):
return message
}
}
}