I think the above is the simplest solution to the problem. However, perhaps a nicer alternative would be to remove the WhatDoIHave() output from the ContainerValidationException exception message entirely and instead store it in a new property on ContainerValidationException? That way the console and logging framework writes would be reduced in size and contain just the error information, but the full WhatDoIHave() detail would be available in the exception where required.
Proposed solution to https://github.com/JasperFx/lamar/issues/180
I think the above is the simplest solution to the problem. However, perhaps a nicer alternative would be to remove the
WhatDoIHave()
output from theContainerValidationException
exceptionmessage
entirely and instead store it in a new property onContainerValidationException
? That way the console and logging framework writes would be reduced in size and contain just the error information, but the fullWhatDoIHave()
detail would be available in the exception where required.