Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4012

Do not catch SlingValidationExceptions in the ValidationServiceImpl.java

Details

    Description

      Currently all SlingValidationExceptions are caught in the ValidationServiceImpl.java (https://github.com/apache/sling/blob/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java#L384). Since those exceptions should only happen during development, it would be very good, if those exceptions would not be caught by the ValidationServiceImpl. That way the exception is printed in most of the cases directly into the response (i.e. is easier to see during development time). Also features like a custom exception handler (through a servlet filter) or the AEM error filter could be used to expose that exception.

      Attachments

        Activity

          githubbot ASF GitHub Bot added a comment -

          GitHub user kwin opened a pull request:

          https://github.com/apache/sling/pull/29

          SLING-4012, do not catch SlingValidationExceptions

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/kwin/sling SLING-4012-rethrow-SlingValidationException

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/sling/pull/29.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #29


          commit bec979a16425a111bb2b37c5b6824e20b3c4617f
          Author: Konrad Windszus <konrad.windszus@netcentric.biz>
          Date: 2014-10-08T06:53:59Z

          SLING-4012, do not catch SlingValidationExceptions


          githubbot ASF GitHub Bot added a comment - GitHub user kwin opened a pull request: https://github.com/apache/sling/pull/29 SLING-4012 , do not catch SlingValidationExceptions You can merge this pull request into a Git repository by running: $ git pull https://github.com/kwin/sling SLING-4012 -rethrow-SlingValidationException Alternatively you can review and apply these changes as the patch at: https://github.com/apache/sling/pull/29.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #29 commit bec979a16425a111bb2b37c5b6824e20b3c4617f Author: Konrad Windszus <konrad.windszus@netcentric.biz> Date: 2014-10-08T06:53:59Z SLING-4012 , do not catch SlingValidationExceptions

          Committed in revision 1630025, thanks!

          bdelacretaz Bertrand Delacretaz added a comment - Committed in revision 1630025, thanks!
          githubbot ASF GitHub Bot added a comment -

          Github user kwin closed the pull request at:

          https://github.com/apache/sling/pull/29

          githubbot ASF GitHub Bot added a comment - Github user kwin closed the pull request at: https://github.com/apache/sling/pull/29

          People

            bdelacretaz Bertrand Delacretaz
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: