inners exceptions from dataportal

inners exceptions from dataportal

Old forum URL: forums.lhotka.net/forums/t/12608.aspx


ajj3085 posted on Saturday, May 03, 2014

We started using Csla, and our object graph is deeper than usual, I think about six levels. One complaint is that if an exception occurs in a lower level data portal method, by the time it gets back to the client code the real exception is in like six InnerExceptions, all DPE.  Is there any reason for this?  I understand wrapping in one DP exception, but it doesn't seem like having to recourse through all the inner exceptions adds any value.  Is it possible to have Csla only wrap the exception once?

JonnyBee replied on Sunday, May 04, 2014

Sound like your code is nesting a number of DataPortal "root" calls rather then using client DataPortal calls.

ajj3085 replied on Sunday, May 04, 2014

JonnyBee
Sound like your code is nesting a number of DataPortal "root" calls rather then using client DataPortal calls.

No, we only have one normal DP call, the rest are ChildFetch, ChildCreate, etc.  This is with 4.5.501 on .net 4.

tiago replied on Sunday, May 04, 2014

Hi Andy,

 

You can find a sample of 6 level deep object on http://cslagenfork.codeplex.com/releases/view/100945

ajj3085 replied on Sunday, May 04, 2014

Tiago Freitas Leal
You can find a sample of 6 level deep object on http://cslagenfork.codeplex.com/releases/view/100945 

 thanks, but this isn't what my question is about.

rxelizondo replied on Monday, May 05, 2014

 

We have the same issue here. What we ended up doing was to basically trap the exception on the root object, drill down through the exception until we find the exception we are looking for, extract the exception and do a clean re-throw it from the root object. Not a neat solution but it at least it allows us to have consistent exception throwing coming from the business object.

This is not an answer to your question but I though I would post anyway as someone that is experiencing the same issue.

ajj3085 replied on Monday, May 05, 2014

Rene Elizondo
We have the same issue here. What we ended up doing was to basically trap the exception on the root object, drill down through the exception until we find the exception we are looking for, extract the exception and do a clean re-throw it from the root object. Not a neat solution but it at least it allows us to have consistent exception throwing coming from the business object.

Hey Rene, thanks for posting.  that is the workaround we have too, but I'm hoping its a bug that gets fixed, and I'm inferring from Johnny's response it is.

rxelizondo replied on Tuesday, May 13, 2014

 

Out of curiosity, anybody has an answer for this? is this a bug or by design behavior?

Thanks.

ajj3085 replied on Wednesday, May 14, 2014

I'd argue its a bug since each inner DPE adds no value :-)

Copyright (c) Marimer LLC