The exception chain is unwrapped first before sending it to any handlers. A generic Exception handler usually is pretty useless.
You could add some logic into it to skip it if the type is a ConnectionException. You could also create a BeforeHandler (use the annotations) for your SolrException, that should be called before your generic Exception handler. On Sunday, March 1, 2015, Karl Kildén <[email protected]> wrote: > Hello, > > I have a typical use case I can't figure out what I might misunderstand. I > have a java.net.ConnectException as root exception. This is wrapped by > SolrServerException. I want my handler on SolrServerException because the > ConnectionException is to broad and I can't draw any conclusions. However > the SolrServerException is easy to parse and print a good message to the > end user. > > Problem is I have a general dump Handler that takes Exception and redirects > to error page. This is where my exception ends up BEFORE handler that > takes SolrServerException. I want it to try to whole chain up to the outer > cause before going to my handler that takes Exception... > > Cheers > -- Jason Porter http://en.gravatar.com/lightguardjp
