add new issue       

Issue ID:  738     Fix exception handling in child data portal      
Created by rocky on 2010-04-22 10:39 AM, 2773 days ago
Project:  CSLA .NET
Category:  bug
Priority:  high
Status:  closed
Feature area:Data Portal
Version:3.8.x
  Entering "issue#999" in comment creates link to id 999

show inline images      show change history

comment 2755 posted by rocky on 2010-07-26 9:40 AM, 2678 days ago 
There's still an unprotected obj.Instance call in the exception handling code.
comment 2422 posted by rocky on 2010-04-22 10:39 AM, 2773 days ago 
Needs to be fixed in 3.8 and 4, and .NET and SL.
comment 2421 posted by rocky on 2010-04-22 10:39 AM, 2773 days ago 

When create of a child object fails (in my case by an exception thrown in AddBusinessRules), the catch in ChildDataPortal.Create is executed. When both 'target' and 'obj' are null the throw Exception statement itself throws a null reference exception because it references obj.Instance.

This makes debugging very difficult and should be fixed.