You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I found out that there is the very useful difference between ChannelException and ConnectionException. Soft and hard exception.
So I thought the ConsumerTagNotFoundException was a soft exception, a ChannelException.
But it wasn't. It was directly inheriting std::runtime_error which was really confusing, because it wasn't even an AmqpException which is supposed to be the base class for every exception thrown by this library.
So what I'd really like would be:
Every exception defined in this library should be derived from AmpqException (No way that I am catching AmqpExceptions in good faith only to find out 1 hour later that this particular exception defined here is a std::runtime_error).
Don't make the difference between soft and hard altogether. Make it clear in the comments that a ConnectionException is really, really heavy, and one needs to reconnect.
There is no soft and hard from a user perspective. Yes, ConnectionException is always hard, but any other exception might be hard at this point in time for this particular user as well. Let the user decide what's hard and what not, just make it clear to him what e. g. ConnectionException entails. C++ devs can handle and count on reliable exception hierarchies, so make sure that all your exceptions are within a reliable hierarchy.
The text was updated successfully, but these errors were encountered:
Hi,
So I found out that there is the very useful difference between ChannelException and ConnectionException. Soft and hard exception.
So I thought the ConsumerTagNotFoundException was a soft exception, a ChannelException.
But it wasn't. It was directly inheriting std::runtime_error which was really confusing, because it wasn't even an AmqpException which is supposed to be the base class for every exception thrown by this library.
So what I'd really like would be:
There is no soft and hard from a user perspective. Yes, ConnectionException is always hard, but any other exception might be hard at this point in time for this particular user as well. Let the user decide what's hard and what not, just make it clear to him what e. g. ConnectionException entails. C++ devs can handle and count on reliable exception hierarchies, so make sure that all your exceptions are within a reliable hierarchy.
The text was updated successfully, but these errors were encountered: