Skip to content

Commit d3f89b1

Browse files
authored
if no error handler set produce a fatal error (like the default used to be) (#238)
1 parent c8c7860 commit d3f89b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/MLX/ErrorHandler.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ private final class ErrorHandler: @unchecked Sendable {
328328
lock.withLock {
329329
if let globalHandler {
330330
globalHandler(message, globalData)
331+
} else {
332+
fatalError(message)
331333
}
332334
}
333335
}

0 commit comments

Comments
 (0)