@@ -30,8 +30,13 @@ private nonisolated(unsafe) let _fallbackEventHandler = {
3030private nonisolated ( unsafe) let _fallbackEventHandler = Atomic < UnsafeRawPointer ? > ( nil )
3131#endif
3232
33- /// A type describing a fallback event handler to invoke when testing API is
34- /// used while the testing library is not running.
33+ /// A type describing a fallback event handler that testing API can invoke as an
34+ /// alternate method of reporting test events to the current test runner.
35+ ///
36+ /// For example, an `XCTAssert` failure in the body of a Swift Testing test
37+ /// cannot record issues directly with the Swift Testing runner. Instead, the
38+ /// framework packages the assertion failure as a JSON `Event` and invokes this
39+ /// handler to report the failure.
3540///
3641/// - Parameters:
3742/// - recordJSONSchemaVersionNumber: The JSON schema version used to encode
@@ -52,9 +57,7 @@ package typealias FallbackEventHandler = @Sendable @convention(c) (
5257/// - Returns: The currently-set handler function, if any.
5358///
5459/// - Important: This operation is thread-safe, but is not atomic with respect
55- /// to calls to ``setFallbackEventHandler(_:)``. If you need to atomically
56- /// exchange the previous value with a new value, call
57- /// ``setFallbackEventHandler(_:)`` and store its returned value.
60+ /// to calls to `_swift_testing_installFallbackEventHandler(_:)`.
5861@_cdecl ( " _swift_testing_getFallbackEventHandler " )
5962@usableFromInline
6063package func _swift_testing_getFallbackEventHandler( ) -> FallbackEventHandler ? {
0 commit comments