|
In the same way we allow
myFuture
|
.onError<SomeErrorCode>(/ * Handle this type of error */ )
|
.onError<SomeOtherCode>(/* Handle other type of error */)
|
.onError(/* handle all other errors */)
|
it would be nice to have a way to do this with ErrorCategory types, like ShutdownError, since frequently these all need to be handled the same way.
E.g.
myFuture
|
.onError<SomeErrorCode>(/ * Handle this type of error */ )
|
.onError<SomeOtherCode>(/* Handle other type of error */)
|
.onErrorCategory<ErrorCategory::ShutdownError>(/* Handle error for which isShutdownError(code) is true */)
|
.onError(/* handle all other errors */)
|
|