mdobak / go-xerrors Goto Github PK
View Code? Open in Web Editor NEWThe go-xerrors is an idiomatic and lightweight package that provides a set of functions to make working with errors easier.
License: MIT License
The go-xerrors is an idiomatic and lightweight package that provides a set of functions to make working with errors easier.
License: MIT License
Thanks for the great little library, it solves a lot of what we've been looking for.
It'd be useful if the withWrapper struct (and Wrapper interface) would expose the wrapper error. Right now, the format function produces something like this for nested errors:
Error: wrapper 2: wrapper 1: original error
Previous error: wrapper 1: original error
Previous error: original error
The testError in format_test.go displays roughly what I want, but only by implementing a different Error() function.
I'd also like to be able to enable/disable stacktraces while maintaining this list of causes; I'm fine with writing my own formatter, but I'd rather avoid replacing the wrappedError and xerrors.New constructor.
I'm happy to submit a PR if you're OK with this direction.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.