|
FastLED 3.9.15
|
Generic expected<T, E> type for error handling without exceptions.
This is a high-level error handling pattern that provides explicit error handling without exceptions. It's modeled after C++23's std::expected.
Example (with default error type):
Example (with custom error type):
Definition in file expected.h.
#include "fl/stl/stdint.h"#include "fl/stl/variant.h"#include "fl/stl/string.h"#include "fl/stl/noexcept.h"
Include dependency graph for expected.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | fl::ErrorInfo< E > |
| Error information for expected type. More... | |
| class | fl::expected< T, E > |
| expected type for operations that can fail (C++23-style) More... | |
| class | fl::expected< void, E > |
| Specialization for void (no value to return) More... | |
| struct | fl::VoidSuccess |
| Dummy type for void expected success state. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
Enumerations | |
| enum class | fl::ResultError : u8 { fl::OK , fl::UNKNOWN , fl::INVALID_ARGUMENT , fl::OUT_OF_RANGE , fl::NOT_INITIALIZED , fl::ALREADY_INITIALIZED , fl::ALLOCATION_FAILED , fl::TIMEOUT , fl::BUSY , fl::NOT_SUPPORTED , fl::IO_ERROR } |
| Generic error codes for expected type. More... | |
| struct fl::VoidSuccess |