In here a call to Close() is made from the destructors, destructors which are noexcept(true) by default.
|
~ProducerClient() { Close(); } |
Close() throws exceptions in various scenarios which leads to user getting terminated whenever that happens.
From here I see two options:
- Users can hardly do anything if for some reasons it could not be closed, so we can catch and log the exception.
- Let users call Close themselves to properly handle the scenarios they want.
In here a call to Close() is made from the destructors, destructors which are noexcept(true) by default.
azure-sdk-for-cpp/sdk/eventhubs/azure-messaging-eventhubs/inc/azure/messaging/eventhubs/producer_client.hpp
Line 101 in 04f2ce0
Close() throws exceptions in various scenarios which leads to user getting terminated whenever that happens.
From here I see two options: