You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Jason Porter (Created) (JIRA)" <ji...@apache.org> on 2012/03/27 03:09:24 UTC

[jira] [Created] (DELTASPIKE-131) Discuss the concept of exception handlers

Discuss the concept of exception handlers
-----------------------------------------

                 Key: DELTASPIKE-131
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-131
             Project: DeltaSpike
          Issue Type: Sub-task
          Components: ExceptionHandler-Module
            Reporter: Jason Porter
            Assignee: Jason Porter


The core of exception handling from Solder is around exception handler methods. These are simple, usually stateless methods that handle a particular type of exception (concrete type or super type). Information about them can be found at http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/catch-client_usage.html#client_usage.handlers 

In Solder these live on an annotated type with a marker annotation (@HandlesExceptions) to speed processing. Handler methods are denoted by an annotation @Handles. They behave similar to observers in CDI. Each argument after the first is an injection point and resolved before calling the method.

Exception handler methods can also be ordered in a consistent deterministic way. based on the hierarchy of the exception being handled, and if needed by an ordinal number (used only if multiple handlers apply for the same exception and same traversal type).

Handlers are called in one of two traversals of the exception chain. Either during a depth first search for handlers or a breadth first search. This search looks at the type of exception being handled by the handlers. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-131) Discuss the concept of exception handlers

Posted by "Nicklas Karlsson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240180#comment-13240180 ] 

Nicklas Karlsson commented on DELTASPIKE-131:
---------------------------------------------

Would is be possible to make the handles-resolver processes more customizable? So you could just provide your own resolver on a per-exception basis instead of just depth/breadth or handler precedence?
                
> Discuss the concept of exception handlers
> -----------------------------------------
>
>                 Key: DELTASPIKE-131
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-131
>             Project: DeltaSpike
>          Issue Type: Sub-task
>          Components: ExceptionHandler-Module
>            Reporter: Jason Porter
>            Assignee: Jason Porter
>             Fix For: 0.2-incubating
>
>
> The core of exception handling from Solder is around exception handler methods. These are simple, usually stateless methods that handle a particular type of exception (concrete type or super type). Information about them can be found at http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/catch-client_usage.html#client_usage.handlers 
> In Solder these live on an annotated type with a marker annotation (@HandlesExceptions) to speed processing. Handler methods are denoted by an annotation @Handles. They behave similar to observers in CDI. Each argument after the first is an injection point and resolved before calling the method.
> Exception handler methods can also be ordered in a consistent deterministic way. based on the hierarchy of the exception being handled, and if needed by an ordinal number (used only if multiple handlers apply for the same exception and same traversal type).
> Handlers are called in one of two traversals of the exception chain. Either during a depth first search for handlers or a breadth first search. This search looks at the type of exception being handled by the handlers. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-131) Discuss the concept of exception handlers

Posted by "Jason Porter (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240199#comment-13240199 ] 

Jason Porter commented on DELTASPIKE-131:
-----------------------------------------

I'd have to think about that. Currently you can terminate the execution of the handler calls. I would think if you gave the concrete type of the exception then called handled() you'd be good.
                
> Discuss the concept of exception handlers
> -----------------------------------------
>
>                 Key: DELTASPIKE-131
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-131
>             Project: DeltaSpike
>          Issue Type: Sub-task
>          Components: ExceptionHandler-Module
>            Reporter: Jason Porter
>            Assignee: Jason Porter
>             Fix For: 0.2-incubating
>
>
> The core of exception handling from Solder is around exception handler methods. These are simple, usually stateless methods that handle a particular type of exception (concrete type or super type). Information about them can be found at http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/catch-client_usage.html#client_usage.handlers 
> In Solder these live on an annotated type with a marker annotation (@HandlesExceptions) to speed processing. Handler methods are denoted by an annotation @Handles. They behave similar to observers in CDI. Each argument after the first is an injection point and resolved before calling the method.
> Exception handler methods can also be ordered in a consistent deterministic way. based on the hierarchy of the exception being handled, and if needed by an ordinal number (used only if multiple handlers apply for the same exception and same traversal type).
> Handlers are called in one of two traversals of the exception chain. Either during a depth first search for handlers or a breadth first search. This search looks at the type of exception being handled by the handlers. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DELTASPIKE-131) Discuss the concept of exception handlers

Posted by "Jason Porter (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Porter resolved DELTASPIKE-131.
-------------------------------------

    Resolution: Fixed

You can see the result of the discussion in the form of an API at https://cwiki.apache.org/confluence/display/DeltaSpike/Exception+Control+Drafts
                
> Discuss the concept of exception handlers
> -----------------------------------------
>
>                 Key: DELTASPIKE-131
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-131
>             Project: DeltaSpike
>          Issue Type: Sub-task
>          Components: ExceptionControl-Module
>            Reporter: Jason Porter
>            Assignee: Jason Porter
>             Fix For: 0.2-incubating
>
>
> The core of exception handling from Solder is around exception handler methods. These are simple, usually stateless methods that handle a particular type of exception (concrete type or super type). Information about them can be found at http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/catch-client_usage.html#client_usage.handlers 
> In Solder these live on an annotated type with a marker annotation (@HandlesExceptions) to speed processing. Handler methods are denoted by an annotation @Handles. They behave similar to observers in CDI. Each argument after the first is an injection point and resolved before calling the method.
> Exception handler methods can also be ordered in a consistent deterministic way. based on the hierarchy of the exception being handled, and if needed by an ordinal number (used only if multiple handlers apply for the same exception and same traversal type).
> Handlers are called in one of two traversals of the exception chain. Either during a depth first search for handlers or a breadth first search. This search looks at the type of exception being handled by the handlers. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira