My main concern with this, is that I guess in vast majority of cases doing so would be harmful. I guess in probably any case other than integrating with some odd external framework (which IIRC is where John's example came from in the first place) we want to clearly notify the user that there is something wrong and that they should take a compensating action - make the property
not wireable, or handle the issue in the setter.

I never needed this before, which is why I find it hard be opinionated about it, but I suppose most of the time the issue in the first place would be a result of some programmer's error.

Krzysztof



On 2010-04-06 20:02, Mauricio Scheffer wrote:
It also depends somewhat on what the user wants. For example in this
case I could want to allow the resolution of Service1 despite setter
exception and Service2 .ctor exception since Service2 is only an
optional dependency.
I know this is not a sensible default behavior, I'm just thinking out
loud.

On Apr 6, 2:02 pm, Krzysztof Koźmic<[email protected]>
wrote:
Hey,

John brought to my attention the following issue - what should happen
when during resolution process something goes wrong.
An exception is thrown, at any stage of the process, the component's
.ctor throws it's dependency's .ctor throws, property setter throws etc.

What should happen then, and to what extent should Windsor try to
recover/clean up. I'm sure John will clarify it further with actual
scenario he encountered this issue in, but in the meantime here's sample
code for this issue:http://gist.github.com/330993

Ideas?

Krzysztof

--
You received this message because you are subscribed to the Google Groups "Castle 
Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to