class StatefulError
Defined at line 18 of file ../../sdk/lib/c/dlfcn/dl/test/../stateful-error.h
dl::StatefulError holds a dl::Error object for use in the dlerror() model.
It's used as `return gPerThreadErrorState(..., error_value);` where ...
returns some `fit::result
::Error, T>` type and error_value is a T. That
sets the error state that GetAndClearLastError() returns like dlerror().
Public Methods
template <typename T, typename U>
T operator() (fit::result<Error, T> result, U error_value)
Convert the fit::result
::Error, T> return value into just a T.
If result.is_error() then
Defined at line 23 of file ../../sdk/lib/c/dlfcn/dl/test/../stateful-error.h
const char * GetAndClearLastError ()
This works like dlerror(): it returns nullptr if there hasn't been a
failing call since the last GetAndClearLastError call. Regardless,
it ends the lifetime of the last string returned by a previous call.
Defined at line 34 of file ../../sdk/lib/c/dlfcn/dl/test/../stateful-error.h
void ~StatefulError ()
Destruction is always harmless, unlike dl::Error.
Defined at line 37 of file ../../sdk/lib/c/dlfcn/dl/test/../stateful-error.h