Re: [go-nuts] How to idiomatically display chained errors?

2017-02-06 Thread so . query
That does look better. Are there any other examples from the Go source I can look at it? On Sunday, February 5, 2017 at 1:56:51 PM UTC-8, Lars Seipel wrote: > > On Sat, Feb 04, 2017 at 12:08:20AM -0800, so.q...@gmail.com > wrote: > > The following would print out "ERROR: Foo() ERROR: Bar()

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-05 Thread Lars Seipel
On Sat, Feb 04, 2017 at 12:08:20AM -0800, so.qu...@gmail.com wrote: > The following would print out "ERROR: Foo() ERROR: Bar() ERROR: > stdlib.Func() something went wrong with this standard function call", which > feels obviously wrong. Leave out the "ERROR" string as well as the gratuitous

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-04 Thread so . query
I don't see an "Errors" subsection under the Methods chapter (6). Could you write a short example? On Saturday, February 4, 2017 at 3:50:49 PM UTC-8, oso wrote: > > You should avoid to put newline. I recommend you to have a look at > "Errors" (which is under Method section) section of

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-04 Thread oso
You should avoid to put newline. I recommend you to have a look at "Errors" (which is under Method section) section of http://www.gopl.io/ book. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-04 Thread so . query
So put each on a newline? On Saturday, February 4, 2017 at 12:17:45 AM UTC-8, Sander van Harmelen wrote: > > Did you check the errors package: https://godoc.org/github.com/pkg/errors > ? > > It offers a great way to wrap

Re: [go-nuts] How to idiomatically display chained errors?

2017-02-04 Thread Sander van Harmelen
Did you check the errors package: https://godoc.org/github.com/pkg/errors ? It offers a great way to wrap chained errors. Sander On 4 Feb 2017, at 09:08, so.qu...@gmail.com wrote: Is there a idiomatic recommendation for generally displaying errors resulting from chained methods? The

[go-nuts] How to idiomatically display chained errors?

2017-02-04 Thread so . query
Is there a idiomatic recommendation for generally displaying errors resulting from chained methods? The following would print out "ERROR: Foo() ERROR: Bar() ERROR: stdlib.Func() something went wrong with this standard function call", which feels obviously wrong. func main() { if err :=