Design patterns·Functional ideas that went mainstream
the failure came back as a return value with the reason attached, and no exception was ever thrown.
Result type
Also calledEither, Try, outcome type
A type with a success case and a failure case carrying an error value, making a failure part of the signature. It makes the possible failures visible and forces them to be handled or explicitly passed on, where an exception is invisible and travels until something catches it. The trade is that errors have to be threaded through by hand, which is what railway-oriented programming is a technique for.