Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-421

ExceptionMapper problem when overriding RuntimeException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.RC1
    • None
    • None
    • None

      We can use the RESTEasy facility to override the default exception mappers to produce our own custom messages. But, when we override Exception, RuntimeException, and org.jboss.resteasy.spi.ApplicationException, then any of the custom mappers we have developed seems to be overriden - because they subclass these Exceptions. Is there a solution that will allow us to have a custom mapper, for say OptimisticLockException, and then a generic mapper that might catch the remainder of exceptions we are not mapping - which than also doesn't catch any sub-classed Exceptions? Thanks!

      The problem is that if you override RuntimeException, ApplicationException mapper will trigger the mapper!

            patriot1burke@gmail.com Bill Burke (Inactive)
            patriot1burke@gmail.com Bill Burke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: