rsocket-cpp icon indicating copy to clipboard operation
rsocket-cpp copied to clipboard

Replace use of folly::Expected with folly::Try in RSocketServiceHandler

Open alexmalyshev opened this issue 7 years ago • 0 comments

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.

alexmalyshev avatar Sep 07 '17 18:09 alexmalyshev