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

Exception handlers: support handling unexpected exceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 0.4
    • None

    Description

      Provide a way to handle exceptions not handled by any other handler.

      Currently, a handler like this:
      public void unexpectedException(@Handles CaughtException<Throwable> event) {
      if (!event.isMarkedHandled())

      { log.error("Unexpected exception", event.getException()); messages.error(new BundleKey(MESSAGE_BUNDLE, "unexpected.exception")); }

      }
      gets in the way when there are other handlers which respond to non-root-cause exceptions.

      Some ideas:

      • an UnhandledException event fired as a last chance to handle it before re-throwing it as unhandled
      • a third traversal type - after BREADTH_FIRST and DEPTH_FIRST

      See https://community.jboss.org/thread/198408

      Attachments

        Activity

          People

            lightguard Jason Porter
            ivom Ivo Maixner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: