qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiri Danek <jda...@redhat.com>
Subject Re: Electron/Amqp MessageAnnotations in Golang
Date Fri, 10 Nov 2017 13:28:11 GMT
On Fri, Nov 10, 2017 at 1:10 PM, Alessio Gottardo <tappoz84@yahoo.it.invalid
> wrote:
> Out of curiosity is there a specific reason for `panic`ing in the
> `default` case instead of returning an `error`?I just became aware of this
> `recover` mechanism in go to handle a runtime `panic` thrown somewhere
> else, but that's going to make the code quite a bit more complicated. I was
> wondering if it would have been easier to return an error to whoever uses
> the `amqp` go wrapper, but I see that could have quite of an impact on the
> codebase as it is at the moment.
> Thank you for the fix.Alessio

I was thinking the same thing. I read somewhere that `panic`s in Go are
intended to not cross library boundaries (and not be part of the API).
Jiri Daněk

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message