Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3876

ExceptionUtil additions

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 4.5
    • None
    • core
    • None

      Adding a few utility methods to ExceptionUtil:

      • a method to help palliating the absence of multi-catch in Java<7 : useful in scenarios when several checked exceptions must be treated the same way then rethrown (typical in filters) (rethrow(e, allowedTypes..))
      • a method to go through the stack of "causes" of a given exception to see if there's a cause of a given type (wasCauseBy}(e, suspectedCause)
      • a method to turn exception class names into useful information. Typically, JCR exceptions have meaningful names and their "message" is meaningless on its own: PathNotFoundException("/foo/bar") can be turned into "Path not found: /foo/bar". (exceptionToWords(e))

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: