-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Concurrency
-
None
-
Fully Compatible
-
Service Arch 2019-01-28, Service Arch 2019-02-11
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 */)