It is easy to catch the exceptions when the type is expected<exception_ptr,T>.
However, doing it for expected<E,T> needs a conversion from the current exception and the error E.
This proposal requires that the continuation doesn’t throw exceptions as we don’t have a general solution.
Should expected<exception_ptr,T>::map/bind/then catch the exceptions and propagate them on the result?
Should expected<E,T>::map/bind/then catch the exceptions and propagate them on the result by doing a transformation from the exception to the error?
If yes, how to configure it?
It is easy to catch the exceptions when the type is
expected<exception_ptr,T>.However, doing it for
expected<E,T>needs a conversion from the current exception and the error E.This proposal requires that the continuation doesn’t throw exceptions as we don’t have a general solution.
Should
expected<exception_ptr,T>::map/bind/thencatch the exceptions and propagate them on the result?Should
expected<E,T>::map/bind/thencatch the exceptions and propagate them on the result by doing a transformation from the exception to the error?If yes, how to configure it?