blankensteiner commented on a change in pull request #52:
URL: https://github.com/apache/pulsar-dotpulsar/pull/52#discussion_r482060380



##########
File path: src/DotPulsar/Internal/ConsumerProcess.cs
##########
@@ -84,8 +84,15 @@ protected override void CalculateState()
 
         private async void SetupChannel()
         {
-            var channel = await 
_factory.Create(CancellationTokenSource.Token).ConfigureAwait(false);
-            await _consumer.SetChannel(channel).ConfigureAwait(false);
+            try
+            {
+                var channel = await 
_factory.Create(CancellationTokenSource.Token).ConfigureAwait(false);
+                await _consumer.SetChannel(channel).ConfigureAwait(false);
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine($"Setup Channel failed for Consumer \n 
{ex.ToString()}");

Review comment:
       Let's remove the output to the console here. We don't know if there even 
is a console and the exception thrown has already been through the exception 
handling pipeline (and outputted if that is what the user wanted).
   So, we can have an empty catch.
   ```csharp
   catch
   {
       // ignored
   }
   ```
   The same goes for the ProducerProcess and we also need this for the 
ReaderProcess.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to