FastLED 3.9.15
Loading...
Searching...
No Matches

◆ error_message()

template<typename T>
fl::string fl::result< T >::error_message ( ) const
inline

Get the error message as a convenience.

Returns
Error message string, or empty string if successful
Note
Safe to call on success results (returns empty string)

Definition at line 114 of file promise_result.h.

114 {
115 return ok() ? fl::string() : error().message;
116 }
const Error & error() const
Get the error value.
bool ok() const
Check if the result is successful.
Result type for promise operations.

References error(), fl::Error::message, and ok().

Referenced by test_await_approach(), and test_json_await().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: