EtcPal  HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
View other versions:
BadExpectedAccess Class Reference

Overview

Exception representing bad access to an Expected instance.

Thrown when attempting to access Expected<T>::value() when Expected<T>::has_value() is false. Holds an etcpal::Error; this allows nicer access to error information than just having the etcpal_error_t code.

Inheritance diagram for BadExpectedAccess:

Public Member Functions

 BadExpectedAccess (Error err)
 Construct from a Error. More...
 
Error error () const noexcept
 Get the error code which was contained in the associated Expected when the exception occurred.
 

Constructor & Destructor Documentation

◆ BadExpectedAccess()

BadExpectedAccess ( Error  err)
inlineexplicit

Construct from a Error.

Exceptions
Maythrow std::bad_alloc.

The documentation for this class was generated from the following file: