One of the most common hurdles of working with EventLoopFutures, and a very oft-repeated question on the Discord server is interacting with error-throwing code. The tryFlatMap extension alleviates that by handling any errors thrown by the closure, causing the ELF to fail.
This is the most common error handling pattern anyway.
One of the most common hurdles of working with EventLoopFutures, and a very oft-repeated question on the Discord server is interacting with error-throwing code. The
tryFlatMap
extension alleviates that by handling any errors thrown by the closure, causing the ELF to fail.This is the most common error handling pattern anyway.