Errify is a lightweight, header-only error-handling library for C++. It provides a simple and efficient way to manage errors without exceptions, focusing on type safety, performance, and readability.
β
Header-only: Just include and useβno linking required.
β
No exceptions: Designed for environments where exceptions are not preferred.
β
Lightweight: Minimal overhead for high-performance applications.
β
Type-safe error handling: Uses std::expected or custom error types.
β
Compatible: Works with C++23 and later.
Simply copy the errify.hpp file into your project and include it:
#include "errify.hpp"The examples/ directory contains sample programs demonstrating Errify in action.
cd examples
chmod +x build.sh
./exampleBaseError // A interface class to define custom error
Error // Stores any type which extends BaseError
.hasError // check if error is valid returns bool
.getErrorMessage // returns error message as const char*
C++23 or later
A standard-compliant C++ compiler (GCC, Clang, MSVC).
This project is licensed under the MIT Licenseβfeel free to use, modify, and distribute it!
Contributions are welcome! Feel free to submit pull requests, report issues, or suggest improvements.