Uploaded image for project: 'DistributedLog'
  1. DistributedLog
  2. DL-136

Avoid empty catch blocks

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None

    Description

      Based on the code analysis here : https://www.kiuwan.com/blog/analyzing_distributedlog_twitter-2/, there are 22 Times: Catching exceptions with empty bodies.

      There are exceptions of different types: InterruptedException, KeeperException, Exception, etc.. Even though we think that these exceptions should never occur, if they are captured it means that they are technically possible. In case that they do happen, it will be very difficult to know what is happening and to diagnose the problem. It is very recommendable, at least to add a log trace, in case these exceptions are triggered.

      Attachments

        Issue Links

          Activity

            People

              boyork Brennon York
              hustlmsp Sijie Guo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: