awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

Error management library

排名更新于 2026年7月28日

For custom error definitions, the strongest matches are pkg/errors (pkg/errors is a Go error handling library that provides), ehmicky/modern-errors (This library offers a comprehensive framework for structured error) and dtolnay/thiserror (This library provides macro-driven custom error type definitions and). dtolnay/anyhow and cockroachdb/errors round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

Hand-picked custom error definition libraries for cleaner code, ranked by GitHub stars and activity. Compare the top choices and find the best fit.

Error management library

用 AI 发现最棒的仓库。我们将通过 AI 为您搜索最匹配的仓库。
  • pkg/errorspkg 的头像

    pkg/errors

    8,258在 GitHub 上查看↗

    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

    pkg/errors is a Go error handling library that provides custom error types, stack trace capture, and error wrapping with contextual annotations.

    GoError WrappingStack Trace Formatters
    在 GitHub 上查看↗8,258
  • ehmicky/modern-errorsehmicky 的头像

    ehmicky/modern-errors

    1,482在 GitHub 上查看↗

    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

    This library offers a comprehensive framework for structured error management in JavaScript and TypeScript with custom error hierarchies and a modular plugin architecture.

    JavaScriptCustom Error Type DefinitionsError WrappingJSON Error Serialization
    在 GitHub 上查看↗1,482
  • dtolnay/thiserrordtolnay 的头像

    dtolnay/thiserror

    5,459在 GitHub 上查看↗

    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

    This library provides macro-driven custom error type definitions and automatic error wrapping in Rust, though it relies on standard library features rather than bundling its own standalone stack trace or serialization mechanisms.

    RustCustom Error Type DefinitionsError Wrapping
    在 GitHub 上查看↗5,459
  • dtolnay/anyhowdtolnay 的头像

    dtolnay/anyhow

    6,569在 GitHub 上查看↗

    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

    Anyhow provides flexible error wrapping, context attachment, and stack trace support for Rust applications, though it uses type erasure rather than custom error types.

    RustError Wrapping
    在 GitHub 上查看↗6,569
  • cockroachdb/errorscockroachdb 的头像

    cockroachdb/errors

    2,411在 GitHub 上查看↗

    Go error library with error portability over the network

    CockroachDB errors is a Go error library providing structured error handling, stack traces, wrapping, context, and network serialization features.

    GoError Handling
    在 GitHub 上查看↗2,411
  • rotisserie/erisrotisserie 的头像

    rotisserie/eris

    1,789在 GitHub 上查看↗

    Error handling library with readable stack traces and flexible formatting support 🎆

    This Go library provides readable stack traces and flexible error formatting, fitting the error handling category well despite lacking some advanced serialization features.

    GoError Handling
    在 GitHub 上查看↗1,789
  • juju/errorsjuju 的头像

    juju/errors

    1,387在 GitHub 上查看↗

    Common juju errors and functions to annotate errors. Based on juju/errgo

    This Go library provides structured error annotation and wrapping capabilities, making it a fitting tool for customizable error handling despite lacking built-in serialization support.

    GoError Handling
    在 GitHub 上查看↗1,387
  • joomcode/errorxjoomcode 的头像

    joomcode/errorx

    1,271在 GitHub 上查看↗

    A comprehensive error handling library for Go

    This library provides Go error handling with stack traces, error wrapping, and custom error types, making it a fitting tool for structured error management despite lacking some explicit serialization features.

    GoError Handling
    在 GitHub 上查看↗1,271
  • emperror/errorsemperror 的头像

    emperror/errors

    204在 GitHub 上查看↗

    Drop-in replacement for the standard library errors package and github.com/pkg/errors

    This Go library serves as a drop-in replacement for standard error packages, providing features like custom error types, stack traces, and wrapping, though it lacks some built-in serialization and rich contextual features.

    GoError Handling
    在 GitHub 上查看↗204
  • go-errors/errorsgo-errors 的头像

    go-errors/errors

    1,005在 GitHub 上查看↗

    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

    This Go library provides custom error wrapping and stack trace support, though it lacks built-in contextual data structures and serialization features.

    GoError Wrapping Utilities
    在 GitHub 上查看↗1,005
  • josephlenton/php-errorJosephLenton 的头像

    JosephLenton/PHP-Error

    1,335在 GitHub 上查看↗

    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

    This PHP library provides customizable, prettier error reporting with stack traces, making it a relevant tool for structured error handling despite its age.

    PHPDiagnostic Error PagesError HandlingPHP Development Tools
    在 GitHub 上查看↗1,335
  • error-or/error-orerror-or 的头像

    error-or/error-or

    2,058在 GitHub 上查看↗

    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

    Error-or is a C# result-type library that implements discriminated unions for functional error handling, though it focuses on monadic pipelines rather than stack traces or extensive contextual error wrapping.

    C#Result PatternsDiscriminated UnionsError Handling Patterns
    在 GitHub 上查看↗2,058
  • pumpkinseed/errorsPumpkinSeed 的头像

    PumpkinSeed/errors

    7在 GitHub 上查看↗

    Simple and efficient error package

    This Go package provides a straightforward approach to error handling, though it lacks explicit built-in features for stack traces and serialization support compared to more comprehensive libraries in this category.

    GoError Handling
    在 GitHub 上查看↗7
  • naughtygopher/errorsnaughtygopher 的头像

    naughtygopher/errors

    75在 GitHub 上查看↗

    A drop-in replacement for Go errors, with some added sugar! Unwrap user-friendly messages, HTTP status code, easy wrapping with multiple error types.

    This Go error handling library provides custom wrapping and user-friendly messages as a drop-in replacement, though it lacks explicit stack trace support and serialization in the provided feature set.

    GoError Handling
    在 GitHub 上查看↗75
  • neuronlabs/errorsneuronlabs 的头像

    neuronlabs/errors

    6在 GitHub 上查看↗

    Simple golang error handling with classification primitives.

    This Go library provides structured error classification primitives, fitting the error handling category though it lacks explicit feature mentions for stack traces and serialization.

    GoError Handling
    在 GitHub 上查看↗6
一览前 10 名对比
仓库Star 数语言许可证最后推送
pkg/errors8.3KGoBSD-2-Clause2026年3月27日
ehmicky/modern-errors1.5KJavaScriptMIT2026年6月23日
dtolnay/thiserror5.5KRustApache-2.02026年6月20日
dtolnay/anyhow6.6KRustApache-2.02026年6月20日
cockroachdb/errors2.4KGoApache-2.02026年6月15日
rotisserie/eris1.8KGoMIT2025年4月3日
juju/errors1.4KGoNOASSERTION2023年10月23日
joomcode/errorx1.3KGoMIT2024年11月8日
emperror/errors204GoMIT2022年6月20日
go-errors/errors1KGoMIT2024年1月14日

Related searches

  • Rust 应用错误处理库
  • a library for handling API errors
  • JavaScript error handling
  • Custom data backend
  • a library for managing global application state
  • Custom icon sets
  • an open source workflow execution engine
  • a library for custom data modeling