libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
epaper::Error Struct Reference

#include <errors.hpp>

Public Member Functions

constexpr Error (ErrorCode c)
 Construct error with code only.
 
 Error (ErrorCode c, std::string msg)
 Construct error with code and message.
 
auto what () const -> std::string_view
 Get string representation of the error.
 

Public Attributes

ErrorCode code
 Error code.
 
std::string message
 Optional detailed error message.
 

Constructor & Destructor Documentation

◆ Error() [1/2]

constexpr epaper::Error::Error ( ErrorCode  c)
inlineconstexpr

Construct error with code only.

Parameters
cError code

◆ Error() [2/2]

epaper::Error::Error ( ErrorCode  c,
std::string  msg 
)
inline

Construct error with code and message.

Parameters
cError code
msgDetailed error message

Member Function Documentation

◆ what()

auto epaper::Error::what ( ) const -> std::string_view
inline

Get string representation of the error.

Returns the detailed message if available, otherwise returns the string representation of the error code.

Returns
String describing the error
Examples
/mnt/nas/libepaper/include/epaper/core/errors.hpp.
Here is the call graph for this function:

Member Data Documentation

◆ code

ErrorCode epaper::Error::code

◆ message

std::string epaper::Error::message

Optional detailed error message.

Examples
/mnt/nas/libepaper/include/epaper/core/errors.hpp.

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