14 return "scl::exceptions::InvalidEitherAccess";
22 return InvalidEitherAccess{
"Tried to access Lhs member of Either<Lhs, Rhs> when Rhs was set"};
30 return InvalidEitherAccess{
"Tried to access Rhs member of Either<Lhs, Rhs> when Lhs was set"};
Global namespace of the SCL.
Exception(T &&reason)
Construct an scl::exceptions::Exception from an error message.
Base class for all regular exceptions.
static InvalidEitherAccess leftWhenRight()
Helper function that creates an InvaidEitherAccess when trying to access Lhs when Rhs is active...
static InvalidEitherAccess rightWhenLeft()
Helper function that creates an InvaidEitherAccess when trying to access Rhs when Lhs is active...
Exception class used when attempting to access the wrong type stored in an scl::utils::Either.
const char *const type() const noexcept override
A string describing the name of the exception class.