Multiple Specifications found and none are defined as default.

Oct 14, 2011 at 8:33 PM

Hi,

What do you think about changing the error message at line #96 and #102 of SpecExpress.SpecificationContainer to include the type name?

how about this?

//No default specs defined
if (!defaultSpecs.Any())
{
throw new SpecExpressConfigurationException(string.Format("Multiple Specifications found and none are defined as default for {0}.", type.FullName));
}
//Multiple specs defined as Default
if (defaultSpecs.Count() > 1)
{
throw new SpecExpressConfigurationException(string.Format("Multiple Specifications found and multiple are defined as default for {0}.", type.FullName));
}

This will make it really easy to find the offending type ... Thanks

Coordinator
Nov 2, 2011 at 1:50 PM

NoFear,

I meant to put this in the latest release, but it slipped my mind.  I know that we will be patching it again and want to get it in there.  Its a great suggestion.

Randy