FatalErrorUtilities
public enum FatalErrorUtilities
A utility type that replaces the internal implementation of fatalError()
.
-
A closure that handles a fatal error.
Declaration
Swift
public typealias FatalErrorClosure = (Error, StaticString, UInt) -> Never
-
Replaces the internal implementation of
fatalError(_:file:line:)
with the given closure. Returns aRestorationHandler
to execute that restores the original implentation.Declaration
Swift
static public func replaceFatalError( with closure: @escaping FatalErrorClosure ) -> RestorationHandler
Parameters
closure
The closure to execute when
fatalError(_:file:line:)
is called.