Thanks jason,

> Do you have some code with how you're calling into the exception handling? 


Yep, the code is in [1]


I'll try to test it more thoroughly on my side on Monday (week end time for me 
now ;) )

[1] https://github.com/gonzalad/incubator-deltaspike/blob/ds-rest/deltaspike/modules/rest/impl/src/main/java/org/apache/deltaspike/rest/impl/exceptions/ExceptionMapper.java 
________________________________
De : Jason Porter <[email protected]>
À : "[email protected]" 
<[email protected]>; Adrian Gonzalez <[email protected]> 
Envoyé le : Jeudi 6 décembre 2012 18h25
Objet : Re: Multiple exceptionHandler classes


On Thu, Dec 6, 2012 at 10:11 AM, Adrian Gonzalez <[email protected]> wrote:

Hello,
>
>Is it permitted to have multiple ExceptionHandlers classes in the same 
>application ?
>
>If yes, I have the impression that qualifiers aren't taken into account when 
>it comes to which exceptionHandler method to call first.
>I have the impression that EHA#handleException is called even if the 
>ExceptionToCatchEvent was fired with @RestRequest qualifier.
>

Yes, this works fine, and is tested quite thoroughly in the test suite.


Which ExceptionHandler class is called first depends on every application 
restart.
>
>
>@org.apache.deltaspike.core.api.exception.control.annotation.ExceptionHandler
>public class EHA {
>public void handleException(
>
>@Handles ExceptionEvent<RuntimeException> event) {
>...
>event.handled();
>}
>}
>
>@org.apache.deltaspike.core.api.exception.control.annotation.ExceptionHandler
>public class EHB {
>public void handleException(
>
>@Handles @RestRequest ExceptionEvent<RuntimeException> event) {
>...
>
>event.handled();
>}
>}
>
>Thanks
>
Do you have some code with how you're calling into the exception handling?


-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu 

Reply via email to