errors

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 5 Imported by: 52

README

errors Go Reference CI Coverage Code to Test Ratio Test Execution Time

errors + stack staces.

Usage

import (
    // "errors"
    "github.com/k1LoW/errors"
)

Difference between errors and k1LoW/errors

  • The behaviour of methods with the same name as the errors package is the same.
  • k1LoW/errors has WithStack and StackTraces functions.

References

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxStackDepth = 50

Functions

func As

func As(err error, target any) bool

As is a wrapper for errors.As.

func Is

func Is(err, target error) bool

Is is a wrapper for errors.Is.

func Join

func Join(errs ...error) error

Join is a wrapper for errors.Join.

func New

func New(text string) error

New is a wrapper for errors.New.

func StackTraces

func StackTraces(err error) stackTraces

StackTraces returns the stack traces of the given error(s).

func Unwrap

func Unwrap(err error) error

Unwrap is a wrapper for errors.Unwrap.

func WithStack

func WithStack(err error) error

WithStack sets the stack trace for the given error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL