rabbitmq-dotnet-client
rabbitmq-dotnet-client copied to clipboard
Only throw `RabbitMQ.Client`-specific exceptions.
Describe the bug
From Using Standard Exception Types:
❌ DO NOT throw System.Exception or System.SystemException.
RabbitMQ code should return RabbitMQ exceptions. If there was another exception causing the one being thrown, it should be added as an InnerException.
Reproduction steps
ServiceBase.Notify is throwing System.Exception at https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/client/impl/SessionBase.cs#L128
Expected behavior
a RabbitMQ-specific exception is thrown.
Additional context
No response