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?
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.
Hi Andy,
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.
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.
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.
Out of curiosity, anybody has an answer for this? is this a bug or by design behavior?
Thanks.
I'd argue its a bug since each inner DPE adds no value :-)
Copyright (c) Marimer LLC