deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Gonzalez <adr_gonza...@yahoo.fr>
Subject Multiple exceptionHandler classes
Date Thu, 06 Dec 2012 17:11:09 GMT
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.

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

Mime
View raw message