deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Porter <lightguard...@gmail.com>
Subject Re: Exception Control return flow
Date Fri, 09 Jan 2015 15:59:46 GMT
Just woke up and read this. I think I need to become a bit more awake
before I dig back in to fully understand the question  :) I'll get back to
you later today.

On Friday, January 9, 2015, Allen Cunningham <cunningham@olsdallas.com>
wrote:

> I am trying to use DS Exception Control in a new project. I recently
> discovered that the method that fires the ExceptionToCatchEvent also
> returns.
>
> It may seem odd that I was surprised, but the example InventoryActions
> class in the DS documentation doesn't return anything when the exception
> occurs (which in fact won't compile). I had assumed that DS was doing some
> magic to alter the return path. Now that I look at it closer it is obvious
> - firing an event shouldn't change control flow.
>
> Can someone confirm that the intent of Exception Control is to provide a
> mechanism IN CONJUNCTION with some degree of normal exception handling?
> What I mean by this is that it seems I need to either re-throw the
> exception or return a null to the caller, then use DS exception handling to
> handle it at higher levels in the call stack.
>
> Don't get me wrong - I think this is super cool and it works very well in
> my app! I just want to be sure I'm not missing something.
>
> Allen
>


-- 
Jason Porter
http://en.gravatar.com/lightguardjp

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message