preconditionSuccess(file:line:)

Attaches a callback to the EventLoopFuture that preconditions the original future’s success.

EventLoopFuture.swift:2009
func preconditionSuccess(file: StaticString = #fileID, line: UInt = #line) -> EventLoopFuture<Value>

Parameters

file

The file this function was called in, for debugging purposes.

line

The line this function was called on, for debugging purposes.

If the original future fails, it triggers a precondition failure, causing a runtime error during development. The precondition failure will include the file and line of the calling site.