Consider the following class:
public class ComponentA
{
public ComponentB ComponentB { get; set; }
public ComponentA(ComponentC componentC) { ... }
}
When I resolve a ComponentA
, Castle injects both ComponentB
and ComponentC
correctly.
However, if there is a problem instantiating ComponentB
, it swallows the exception, resulting in delayed errors (NullReferenceException).
I understand the difference between both approaches, but is it possible to make it fail (or at least log the full exception) when there is a problem with an injected property?