Skip to content

Close() throws exception from the destructor of ProducerClient causing the users to terminate, without an opportunity to catch the exception #6957

@Deepa-Pathak

Description

@Deepa-Pathak

In here a call to Close() is made from the destructors, destructors which are noexcept(true) by default.

Close() throws exceptions in various scenarios which leads to user getting terminated whenever that happens.

From here I see two options:

  1. Users can hardly do anything if for some reasons it could not be closed, so we can catch and log the exception.
  2. Let users call Close themselves to properly handle the scenarios they want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Event HubsService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions