Live data from Hacker News

Eris – A better way to handle, trace, and log errors in Go

github.com

1–10 of 61 posts

Re: Eris – A better way to handle, trace, and log errors in Go

#3

IDK about the error json, looks too much like a PHP dump when a descriptive error wrapper will do.

If you are reading the JSON yourself, you’re doing it wrong. JSON logs can be parsed and stored for analysis and generally deal with multi line issues much better than any non json.

Re: Eris – A better way to handle, trace, and log errors in Go

#4
My friend and I have been working on eris for a while and we’re very excited to get feedback from fellow gophers. eris provides a better way to handle, trace, and log errors in Go. More info here github.com/rotisserie/eris and godoc.org/github.com/rotisserie/eris

You can reach out to us on slack (gorotisserie.slack.com/archives/CS13EC3T6) for additional comments and feedback. Thanks!

Re: Eris – A better way to handle, trace, and log errors in Go

#5

My friend and I have been working on eris for a while and we’re very excited to get feedback from fellow gophers. eris provides a better way to handle, trace, and log errors in Go. More info here github.com/rotisserie/eris and godoc.org/github.com/rotisserie/eris You can reach out to us on slack (gorotisserie.slack.com/archives/CS13EC3T6) for additional comments and feedback. Thanks!

Looks nice! Any plans to add support for uploading stacks to Sentry? That's a must have for us and why we are using pkg/errors.

Re: Eris – A better way to handle, trace, and log errors in Go

#6

My friend and I have been working on eris for a while and we’re very excited to get feedback from fellow gophers. eris provides a better way to handle, trace, and log errors in Go. More info here github.com/rotisserie/eris and godoc.org/github.com/rotisserie/eris You can reach out to us on slack (gorotisserie.slack.com/archives/CS13EC3T6) for additional comments and feedback. Thanks!

Looks nice! Any plans to add support for uploading stacks to Sentry? That's a must have for us and why we are using pkg/errors.

Thanks! We'd love to add support if you need it. I'll make a note of it but feel free to add an issue for it if you have time!

Re: Eris – A better way to handle, trace, and log errors in Go

#8
This is really cool! My company has a similar internal library but it doesn't format wrapped errors as well as Eris.

One other issue I've struggled with is in propagating errors across goroutines. If an error is created in the child routine, `runtime.Callers` doesn't include any stack frames from the parent. Assuming the parent wraps the error, it sounds like Eris would give you at least one line of the parent stack trace. Does it handle this specifically by including all of them?

Re: Eris – A better way to handle, trace, and log errors in Go

#9
Have spent a while in the py/js world but have switched to rust/go for part of this year -- biggest change is boilerplate relating to error handling.

Automatic stack capture for exceptions is something my language could conceivably do on my behalf.

Writing even 3 lines of code per function to propogate up the error is a huge pain, especially because it pollutes the return type -- MustWhatever() in go is much easier to use than Whatever() returning (type, err)

Re: Eris – A better way to handle, trace, and log errors in Go

#10

Have spent a while in the py/js world but have switched to rust/go for part of this year -- biggest change is boilerplate relating to error handling. Automatic stack capture for exceptions is something my language could conceivably do on my behalf. Writing even 3 lines of code per function to propogate up the error is a huge pain, especially because it pollutes the return type -- MustWhatever() in go is much easier t…

You're fighting the language. Unless you're writing prototypes where crashing doesn't matter, you should be writing error handling code first, and your business logic second -- so-called "sad path first" programming, c.f. "happy-path first" programming that you usually do in languages with exceptions like Python.
Post reply on HN