# go-errors/errors

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/go-errors-errors).**

1,005 stars · 90 forks · Go · MIT

## Links

- GitHub: https://github.com/go-errors/errors
- Homepage: https://godoc.org/github.com/go-errors/errors
- awesome-repositories: https://awesome-repositories.com/repository/go-errors-errors.md

## Description

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 interchangeably with normal error returns throughout an application. Additionally, it provides panic recovery capabilities that intercept raw runtime panic output strings, converting them into structured error objects equipped with readable stack traces.

Diagnostic functions print detailed error messages and full stack traces to the console or logs, supporting advanced error formatting with custom messages, formatting strings, and stack depth skipping.

## Tags

### Part of an Awesome List

- [Error Handling](https://awesome-repositories.com/f/awesome-lists/devtools/error-handling.md) — Adds stack traces and contextual information to standard Go errors to simplify debugging and root cause analysis.

### Development Tools & Productivity

- [Stack Trace Capture](https://awesome-repositories.com/f/development-tools-productivity/custom-component-wrapping/error-boundary-wrappers/stack-trace-capture.md) — Records execution call stacks when errors occur so developers can inspect the exact execution path. ([source](https://github.com/go-errors/errors/custom-properties))
- [Go Debugging Utilities](https://awesome-repositories.com/f/development-tools-productivity/go-debugging-utilities.md) — Diagnoses backend service failures by capturing execution call stacks, file paths, and line numbers.
- [Runtime Call-Stack Capturers](https://awesome-repositories.com/f/development-tools-productivity/call-stack-navigators/runtime-call-stack-capturers.md) — Captures the program execution call stack into memory at the exact moment an error is initialized.
- [Stack Frame Navigators](https://awesome-repositories.com/f/development-tools-productivity/stack-frame-navigators.md) — Extracts granular file paths, line numbers, and function symbols from raw program counter addresses.

### Programming Languages & Runtimes

- [Error Handling Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/error-handling-libraries.md) — Wraps errors with execution stack traces and context in Go applications.
- [Panic Stack Trace Parsers](https://awesome-repositories.com/f/programming-languages-runtimes/panic-stack-trace-parsers.md) — Converts raw panic text outputs from execution crashes into structured error objects containing stack traces. ([source](https://godoc.org/github.com/go-errors/errors))

### Software Engineering & Architecture

- [Standardized Error Traits](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/standardized-error-traits.md) — Enhances standard errors with additional context and stack trace data without losing the original error message. ([source](https://github.com/go-errors/errors/custom-properties))
- [Error Wrapping Utilities](https://awesome-repositories.com/f/software-engineering-architecture/error-wrapping-utilities.md) — Constructs and wraps errors with custom messages, formatting strings, and stack depth skipping. ([source](https://godoc.org/github.com/go-errors/errors))
- [Wrapped Error Inspection](https://awesome-repositories.com/f/software-engineering-architecture/error-reporting/custom-error-interfaces/error-wrapping/wrapped-error-inspection.md) — Queries and matches errors within hierarchies, extracts underlying causes, and combines multiple errors. ([source](https://godoc.org/github.com/go-errors/errors))
- [Stack Trace Readability Enhancers](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/stack-trace-readability-enhancers.md) — Transforms raw captured execution stack traces into readable strings to simplify logging and inspection. ([source](https://github.com/go-errors/errors/blob/master/README.md))

### System Administration & Monitoring

- [Stack Utilities](https://awesome-repositories.com/f/system-administration-monitoring/stack-trace-inspections/stack-utilities.md) — Provides a toolkit for capturing, formatting, and inspecting execution stack traces attached to errors in Go.
- [Stack Trace Inspections](https://awesome-repositories.com/f/system-administration-monitoring/stack-trace-inspections.md) — Extracts detailed file paths, line numbers, function names, and source lines from captured error stack traces. ([source](https://godoc.org/github.com/go-errors/errors))

### Web Development

- [Full Cause Inspectors](https://awesome-repositories.com/f/web-development/error-handling/full-cause-inspectors.md) — Maintains parent-child error relationships to allow deep inspection and unwrapping of underlying root causes.
- [Panic Recovery](https://awesome-repositories.com/f/web-development/error-handling/panic-recovery.md) — Intercepts raw runtime panic output strings and converts them into structured error objects with readable stack traces.
