On Fri, Nov 10, 2017 at 1:10 PM, Alessio Gottardo <[email protected]
> 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

Reply via email to