We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
MLXError
1 parent b89259d commit 6f58497Copy full SHA for 6f58497
Source/MLX/ErrorHandler.swift
@@ -216,6 +216,12 @@ public func withError<R>(_ body: () async throws -> R) async throws -> R {
216
/// Error type for caught errors during ``withError(_:)-6g4wn``.
217
public enum MLXError: Error {
218
case caught(String)
219
+
220
+ var localizedDescription: String {
221
+ switch self {
222
+ case .caught(let message): "MLX Error: \(message)"
223
+ }
224
225
}
226
227
/// Boxed error type usable with ``withError(_:)-2wfiu``.
0 commit comments