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

ExceptionHandler should call exception hierarchies bottom up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.3-incubating
    • None
    • None

    Description

      I would assume that when you have an exception hierarchy DeltaSpike would call handlers for the sub class before it call handlers for the super class.

      But that's not the case.

      Assume you have:

      public class AccessDeniedException extends RuntimeException {
      }
      
      @ExceptionHandler
      public class AdminWebExceptionHandler {
      	public void handleAccessDeniedException(@Handles @FacesRequest ExceptionEvent<AccessDeniedException> exceptionEvent, FacesContext facesContext) {
      }
      	public void handleRuntimeException(@Handles @FacesRequest ExceptionEvent<RuntimeException> exceptionEvent, FacesContext facesContext) {
      }
      }
      

      In that case handleRuntimeException() is called.
      I would except to have handleAccessDeniedException() called instead.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              maiebe Maik Ebert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: