rsocket-cpp
rsocket-cpp copied to clipboard
Replace use of folly::Expected with folly::Try in RSocketServiceHandler
RSocketServiceHandler
is working with types that look like folly::Expected<RSocketConnectionParams, RSocketException>
. Unfortunately, that means the value must hold an RSocketConnectionParams
or an RSocketException
, no subclasses allowed for either. RSocketException
is not really the most useful of exception types, it's just a wrapper over std::runtime_error
.
We already have an abstraction for "A T
or an arbitrary exception", it's folly::Try<T>
, we should use that instead.