errors icon indicating copy to clipboard operation
errors copied to clipboard

Simple error handling primitives

Results 42 errors issues
Sort by recently updated
recently updated
newest added

Originally, checking if a error matches a given interface, you would simply `m, ok := err.(myInterface)`. With pkg/errors, it's now `m, ok := errors.Cause(err).(myInterface)` (Basing this off of the writing...

Hi, I see that the callers in the source code return *stack instead of stack. Why does this happen? ```golang func callers() *stack { const depth = 32 var pcs...

Hello, Quite clearly this package has been unmaintained for a long time. There are two main reasons for this (along with several others — waves in the general direction of...

I am currently considering using pkg/errors. However, I have a question, so I'm leaving a question. I ran the [example code](https://github.com/pkg/errors/blob/5dd12d0cfe7f152f80558d591504ce685299311e/example_test.go#L115-L143) and expected the output shown in the code comments....

I expected `Errorf` to mimic `fmt.Errorf`'s behavior of wrapping errors. Alas, that was not the case. I was wondering if this is intentional or not. If it's intentional, then is...

As requested in https://github.com/pkg/errors/pull/150 - I made the minimal changes here you requested. Small note: it would be nice if the standard library https://github.com/golang/go/blob/master/src/fmt/print.go#L186 implemented `type Grower interface { Grow(n...

Taking inspiration from how pkg/errors is meant as a drop-in replacement for the standard errors package, I have created an errors package that's specific to a larger project I'm involved...

Need method to check if error is wrapped

Wrapping an error with `errors.Wrap`, unwrapping it with `errors.Unwrap` returns the whole error and not the base one. Is it intentional? https://play.golang.org/p/baYpfrrvN35