Replace Objective-C bridge with Swift ONNX runtime backend
CodeQL Advanced / Analyze (swift) (push) Has been cancelled
CodeQL Advanced / Analyze (swift) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user