Exception is not returned to the client (DynamicListBase)

Exception is not returned to the client (DynamicListBase)

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


oleg posted on Thursday, August 30, 2012

Hi all.

I am trying to remove an item from DynamicListBase like this:

ListOfItems.Remove(item);

If an exception occurs in factory method, it is not returned to the client.

Thanks for any help.

RockfordLhotka replied on Thursday, August 30, 2012

There are two things to consider.

First, you really won't get the exception back - DLB swallows the exception and "unremoves" the item so it remains in the list. This is because DLB is designed for use with data binding, and data binding provides no mechanism for discovery or display of such an exception.

Second, there was a bug in DLB that prevented the item from being correctly unremoved. That bug was fixed in 4.5, and I think in 4.3.

JonnyBee replied on Thursday, August 30, 2012

Plus, in a 3-tier deployment you may get non-serializable exceptions or exceptions that do not exist in assemblies on the client.

Copyright (c) Marimer LLC