Exceptions

Header file bad_access.hpp

namespace outcome_v2_xxx
{
    class bad_result_access;

    template <class S>
    class bad_result_access_with;

    class bad_outcome_access;
}

Class outcome_v2_xxx::bad_result_access

class bad_result_access
: public std::logic_error
{
public:
    explicit bad_result_access(char const* what);
};

Thrown when you try to access state in a result<R, S> which isn’t present.


Class outcome_v2_xxx::bad_result_access_with

template <class S>
class bad_result_access_with
: public bad_result_access
{
public:
    explicit bad_result_access_with(S v);

    //=== result_error ===//
    S const& error() const &;
    S& error() &;
    S const&& error() const &&;
    S&& error() &&;
};

Thrown when you try to access a value in a result<R, S> which isn’t present.

Function outcome_v2_xxx::bad_result_access_with::error

(1) S const& error() const &;

(2) S& error() &;

(3) S const&& error() const &&;

(4) S&& error() &&;

Observes the error



Class outcome_v2_xxx::bad_outcome_access

class bad_outcome_access
: public std::logic_error
{
public:
    explicit bad_outcome_access(char const* what);
};

Thrown when you try to access state in a outcome<T, EC, E> which isn’t present.