Skip to content

arithmeticmean/errify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Errify - A Header-Only Error Handling Library for C++

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.


πŸš€ Features

βœ… 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.


πŸ“¦ Installation

Simply copy the errify.hpp file into your project and include it:

#include "errify.hpp"

⚑ Usage

The examples/ directory contains sample programs demonstrating Errify in action.

cd examples
chmod +x build.sh
./example

πŸ”§ API Overview

BaseError           // 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*

πŸ›  Requirements

C++23 or later

A standard-compliant C++ compiler (GCC, Clang, MSVC).

πŸ“œ License

This project is licensed under the MIT Licenseβ€”feel free to use, modify, and distribute it!

🀝 Contributing

Contributions are welcome! Feel free to submit pull requests, report issues, or suggest improvements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages