As I said to Gerhard in IRC, if it's something that a user could reasonably recover in an exception handler, we should do the integration. I'm also suggesting adding a qualifier to the event fired for exception handling to 1) have those specific handlers looking for ds exceptions handle them first 2) let a user decide if they want to handle it or pass based on the qualifier (handlers w/o qualifiers, like the rest of CDI have a default @Any qualifier) by looking at the qualifiers on the exception.
Of course it may be possible that any exceptions we raise in DS simply aren't able to be handled by a user, in which case we simply leave out the exception handling integration. For other modules such as JSF or REST, we should definitely add integration for passing exceptions from those frameworks through to ds exception handling. I know that's not a hard and fast rule, but it's probably the best way we can go. On Thu, Jun 14, 2012 at 3:23 PM, Gerhard Petracek < [email protected]> wrote: > right now we don't do it during the bootstrapping process (it's done lazily > during runtime). > > the basic question is where and how we integrate our own exception handling > mechanism in the rest of deltaspike. > and i think jason is the expert for it since he wrote the catch module. > > regards, > gerhard > > > > 2012/6/14 Jason Porter <[email protected]> > > > Gerhard asked me to take a look at this, and I didn't have the full > context > > on IRC. In speaking with him it sounded like a good idea to use the DS > > exception handling here, however, Mark makes an excellent point about not > > really being able to solve this without user intervention. We could use > > exception handling here and if there isn't any thing to handle it, we > could > > rethrow the exception and halt the deployment anyway. > > > > Another thought just occurred to me, because we're really doing this > before > > the application fully completes deployment, I'm not even 100% sure > > DeltaSpike exception handling would work, that's probably an > implementation > > specific detail. In light of those two ideas, I'm going to stand by Mark > > and say we should leave it out. > > > > On Thu, Jun 14, 2012 at 12:26 AM, <[email protected]> wrote: > > > > > Updated Branches: > > > refs/heads/master 9ca1855d7 -> 1c6354650 > > > > > > > > > DELTASPIKE-196 NO integration with Exception Handler needed! > > > > > > The DS Exception Handler is for _business_ methods. > > > Technical and configuration issues shall not be handled by DS > > > but by the user. We cannot recover from it without any > > > user interaction anyway... > > > > > > > > > Project: > > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo > > > Commit: > > > > > > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/1c635465 > > > Tree: > > > > > > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/1c635465 > > > Diff: > > > > > > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/1c635465 > > > > > > Branch: refs/heads/master > > > Commit: 1c63546506457e1a74fed6ca92cb9d0c0d54a2fc > > > Parents: 9ca1855 > > > Author: Mark Struberg <[email protected]> > > > Authored: Thu Jun 14 07:55:52 2012 +0200 > > > Committer: Mark Struberg <[email protected]> > > > Committed: Thu Jun 14 07:55:52 2012 +0200 > > > > > > ---------------------------------------------------------------------- > > > .../impl/config/DefaultConfigPropertyProducer.java | 3 --- > > > 1 files changed, 0 insertions(+), 3 deletions(-) > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/1c635465/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/DefaultConfigPropertyProducer.java > > > ---------------------------------------------------------------------- > > > diff --git > > > > > > a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/DefaultConfigPropertyProducer.java > > > > > > b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/DefaultConfigPropertyProducer.java > > > index d878139..cd4422e 100644 > > > --- > > > > > > a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/DefaultConfigPropertyProducer.java > > > +++ > > > > > > b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/DefaultConfigPropertyProducer.java > > > @@ -54,7 +54,6 @@ public class DefaultConfigPropertyProducer extends > > > BaseConfigPropertyProducer > > > return null; > > > } > > > > > > - //X TODO integrate with the HandledHandler of DeltaSpike > > > return Integer.parseInt(configuredValue); > > > } > > > > > > @@ -69,7 +68,6 @@ public class DefaultConfigPropertyProducer extends > > > BaseConfigPropertyProducer > > > return null; > > > } > > > > > > - //X TODO integrate with the HandledHandler of DeltaSpike > > > return Long.parseLong(configuredValue); > > > } > > > > > > @@ -108,7 +106,6 @@ public class DefaultConfigPropertyProducer extends > > > BaseConfigPropertyProducer > > > } > > > > > > //X TODO think about something like @NumberFormat(...) > > > - //X TODO integrate with the HandledHandler of DeltaSpike > > > return Float.parseFloat(configuredValue); > > > } > > > } > > > > > > > > > > > > -- > > Jason Porter > > http://lightguard-jp.blogspot.com > > http://twitter.com/lightguardjp > > > > Software Engineer > > Open Source Advocate > > Author of Seam Catch - Next Generation Java Exception Handling > > > > PGP key id: 926CCFF5 > > PGP key available at: keyserver.net, pgp.mit.edu > > > -- Jason Porter http://lightguard-jp.blogspot.com http://twitter.com/lightguardjp Software Engineer Open Source Advocate Author of Seam Catch - Next Generation Java Exception Handling PGP key id: 926CCFF5 PGP key available at: keyserver.net, pgp.mit.edu
