[seam-issues] [JBoss JIRA] Commented: (SEAMCATCH-50) Interceptor that propagates exceptions
Nicklas Karlsson (JIRA)
jira-events at lists.jboss.org
Sat Mar 19 16:43:45 EDT 2011
[ https://issues.jboss.org/browse/SEAMCATCH-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589124#comment-12589124 ]
Nicklas Karlsson commented on SEAMCATCH-50:
-------------------------------------------
The implementaion is very simple, something like
@Interceptor
@ExceptionHandled
public class ExceptionHandlerInterceptor implements Serializable
{
@Inject
BeanManager beanManager;
@AroundInvoke
public Object manage(InvocationContext ic) throws Exception
{
try
{
return ic.proceed();
}
catch (Exception e)
{
beanManager.fireEvent(new ExceptionToCatch(e));
return null;
}
}
}
They can easily be put in stereotypes but it would be nice if it could be seam-conf:ed to be global.
> Interceptor that propagates exceptions
> --------------------------------------
>
> Key: SEAMCATCH-50
> URL: https://issues.jboss.org/browse/SEAMCATCH-50
> Project: Seam Catch
> Issue Type: Feature Request
> Reporter: Nicklas Karlsson
> Assignee: Jason Porter
>
> A simple CDI interceptor that catches everything the execution throws and fires an exception handling event for them.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list