PIAB: Nested [ObjectValidator] validations

Topics: Policy Injection Application Block, Validation Application Block
Apr 23, 2007 at 8:18 AM
Edited Apr 23, 2007 at 8:19 AM

I'm using the PIAB to inject attribute based validation into my method calls.

The problem I'm having is that say I have
DoSomething(ObjectValidator someParam)

Say someParam simply has something like
public class someParam {
public BlahBlah MyProp {...}

And BlahBlah has
public class BlahBlah {
public object SomeProp {...}

Now, when the PIAB kicks off the parameter based injection for DoSomething on someParam, sure enough if BlahBlah.SomeProp is null, it triggers an exception. Unfortunately, it doesn't include the location of the "real" exception in the message - in this case the exception will reference a validation error in 'someParam', whereas I want it to show the error in 'SomeProp'. Is this a bug, known issue, or me doing something stupid?