Skip to content

Instance Method

future(error:)

Creates a new, failed EventLoopFuture from the worker’s event loop.
func future<T>(error: any Error) -> EventLoopFuture<T>

Parameters

error

The error that the future will wrap.

Return Value

The failed future.

Discussion

Let b: EvenLoopFuture = req.future(error: Abort(…))

See Also

EventLoop and EventLoopGroup