Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-575

Improve "default" exception handling, especially for JSF

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.6
    • None
    • Core, JSF-Module
    • None
    • WebSphere 8.5

    Description

      The default handling for exceptions is to re-throw the exception on completion. While this is fine in some circumstances, it may not be the best choice for JSF 2. The problem is that at least in my applications, I want to have special handling for a few common exceptions (such as JSF's ViewExpiredException), but in the case of a true application error or a resource unavailable error, I want to let the default JSF/Servlet error handling take over. This is particularly a problem with Ajax requests, where JSF's defined error handling is NOT to throw the exception back to the servlet container, but to create a special Ajax response containing an error indicator. Depending on the JSF implementation, re-throwing the exception may bypass that processing.

      In my mind, the best solution is to somehow allow DeltaSpike's JSF ExceptionHandler to request that the exception not be re-thrown by default and to delegate its handling to the wrapped exception handler.

      Another possibility is to provide for a "last resort" exception handler which can be called when the entire exception stack has been processed without the exception being handled. This would allow the developer to at least provide for their own processing for the general exception case.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bmitchell William Mitchell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: