# Error management library

> AI-ranked search results for `custom error definitions` on awesome-repositories.com — ordered by an LLM for relevance, best match first. 115 total matches; showing the top 15.

Explore on the web: https://awesome-repositories.com/q/custom-error-definitions

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/custom-error-definitions).**

## Results

- [pkg/errors](https://awesome-repositories.com/repository/pkg-errors.md) (8,258 ⭐) — pkg/errors is a Go library that provides primitives for creating, annotating, and inspecting errors with stack traces and contextual information. Its core identity centers on capturing the call stack at the point of error creation or wrapping, preserving that information for later debugging and root cause analysis.

The library distinguishes itself through a set of tightly integrated capabilities for error handling. It supports wrapping errors with descriptive messages while recording a new stack trace at the wrapping point, annotating existing errors with either a message or a stack trace ind
- [ehmicky/modern-errors](https://awesome-repositories.com/repository/ehmicky-modern-errors.md) (1,482 ⭐) — This library provides a comprehensive framework for managing errors in JavaScript and TypeScript applications. It enables the creation of structured, type-safe error hierarchies, allowing developers to define custom error classes that ensure consistent behavior and categorization across a codebase.

The project distinguishes itself through a modular plugin architecture that allows for the extension of core error functionality, such as custom logging, serialization, and validation. It includes an exception normalization pipeline that converts non-standard or malformed errors into predictable in
- [dtolnay/thiserror](https://awesome-repositories.com/repository/dtolnay-thiserror.md) (5,459 ⭐) — thiserror is a Rust error handling library and procedural macro designed to define custom error types. It functions as a trait implementation automator that generates the necessary code for standard library error traits at compile time.

The library focuses on eliminating boilerplate by using derive macros to automatically implement display and source methods. It allows for the creation of custom error structs and enums that can map low-level errors to high-level variants while preserving the original cause and backtrace information.

Its capabilities cover custom error formatting through temp
- [dtolnay/anyhow](https://awesome-repositories.com/repository/dtolnay-anyhow.md) (6,569 ⭐) — Anyhow is a dynamic error handling library for Rust applications that provides a flexible error container using type erasure. It serves as a tool for simplifying error signatures by wrapping diverse failure types into a single object, allowing for the propagation of any error that implements the standard error trait without requiring a custom enumeration for every function.

The project functions as an error context provider by attaching high-level diagnostic information and recording execution stack traces at the point of failure. It enables the recovery of concrete error implementations from
- [cockroachdb/errors](https://awesome-repositories.com/repository/cockroachdb-errors.md) (2,411 ⭐) — Go error library with error portability over the network
- [rotisserie/eris](https://awesome-repositories.com/repository/rotisserie-eris.md) (1,789 ⭐) — Error handling library with readable stack traces and flexible formatting support 🎆
- [juju/errors](https://awesome-repositories.com/repository/juju-errors.md) (1,387 ⭐) — Common juju errors and functions to annotate errors.  Based on juju/errgo
- [joomcode/errorx](https://awesome-repositories.com/repository/joomcode-errorx.md) (1,271 ⭐) — A comprehensive error handling library for Go
- [emperror/errors](https://awesome-repositories.com/repository/emperror-errors.md) (204 ⭐) — Drop-in replacement for the standard library errors package and github.com/pkg/errors
- [go-errors/errors](https://awesome-repositories.com/repository/go-errors-errors.md) (1,005 ⭐) — errors is a Go error handling library and stack trace utility that wraps standard errors with execution call stacks and contextual information. It captures program execution paths at the exact moment an error is initialized, extracting granular file paths, line numbers, and function symbols from raw program counter addresses.

The library maintains parent-child relationships between wrapped errors to allow deep inspection, unwrapping of root causes, and combination of multiple errors into unified structures. It implements standard error interfaces so enhanced error objects can be used intercha
- [josephlenton/php-error](https://awesome-repositories.com/repository/josephlenton-php-error.md) (1,335 ⭐) — PHP-Error is a web development utility and error handler that intercepts application exceptions, syntax errors, and fatal errors to replace default engine output with formatted HTML diagnostic pages during local testing. It activates automatically upon startup without requiring manual initialization calls within project code.

The system features interactive diagnostics that include contextual syntax highlighting for code snippets, path-based stack trace filtering to separate external library code from application logic, and inline remote file editing capabilities that persist code modificatio
- [error-or/error-or](https://awesome-repositories.com/repository/error-or-error-or.md) (2,058 ⭐) — Error-or is a library that implements the result pattern to replace exception-based control flow with structured data. It provides a discriminated union implementation that encapsulates either a successful value or an error state within a single type, ensuring that operation outcomes are treated as first-class values.

The library enables functional error handling by providing a fluent interface for chaining sequential operations. This monadic pipeline composition allows developers to define dependent operations that automatically short-circuit and return an error if any individual step in the
- [pumpkinseed/errors](https://awesome-repositories.com/repository/pumpkinseed-errors.md) (7 ⭐) — Simple and efficient error package
- [naughtygopher/errors](https://awesome-repositories.com/repository/naughtygopher-errors.md) (75 ⭐) — A drop-in replacement for Go errors, with some added sugar! Unwrap user-friendly messages, HTTP status code, easy wrapping with multiple error types.
- [neuronlabs/errors](https://awesome-repositories.com/repository/neuronlabs-errors.md) (6 ⭐) — Simple golang error handling with classification primitives.
