Uploaded image for project: 'NorthernWind'
  1. NorthernWind
  2. NW-58

Refactor exceptions in ResourceProperties

Attach ScreenshotCloneRestart (defect)Restart (enhancement)
    XMLWordPrintable

    Details

      Description

      Some methods to retrieve properties in ResourceProperties throw IOException, because of external properties. This makes the client code exception management overcomplex.

      There are two possible fixes:

      1. wrap IOException into a RuntimeException
      2. wrap IOException into a NotFoundException

      Theoretically, an IOException while reading a property should be an unexpected thing, since the existence of the file is checked before trying to access it. This drives toward approach #1.

      OTOH, if the property can't be read, this could make not a lot of difference to client code, provided that the problem is properly logged, and approach #2 would probably make things simpler.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fabrizio.giudici Fabrizio Giudici
                Reporter:
                fabrizio.giudici Fabrizio Giudici
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: