Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12643

camel-rabbitmq - Inadequate information for handling catch clauses

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.23.0
    • Component/s: camel-rabbitmq
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      There are some situations that different exception types are caught, but the handling of those exceptions cannot show the differences between those types. Here are the code snippets which have this problem:

      org.apache.camel.component.rabbitmq.*RabbitConsumer*.handleShutdownSignal, *Line 271*
      
      catch (IOException | TimeoutException e)
      
      {   log.warn("Unable to obtain a RabbitMQ channel. Will try again");     ...      }
      

      It may cause confusions to the person who is reading the log, the person can not know what exception happened here and cannot distinguish if the exception type is IOException or TimeoutException. Simply adding a full stack trace is able to improve it.

       

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              lzh3636 Zhenhao Li
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: