Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-250

Improve error handling in NotificationTest

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Inside the NotificationTest there are several try catch blocks like below:
      } catch (Exception e) {
      LOG.error("Unexpected exception", e);
      fail("Unexpected exception while setting SMTP host and port");
      }

      This makes the code harder to read and at least on the junit level it swallows the exception details and stack trace.

      I propose to remove these blocks and instead let each of these method just throw Exception. junit will then report the exception nicely.

        Attachments

        1. SYNCOPE-250.patch
          7 kB
          Christian Schneider

          Activity

            People

            • Assignee:
              ilgrosso Francesco Chicchiriccò
              Reporter:
              chris@die-schneider.net Christian Schneider
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: