Jan 12, 2012 at 12:23 AM
Edited Jan 12, 2012 at 1:10 AM
OK I understand what you are saying but check out what I got from this experiment. I have stripped each piece as I discovered I didn't need it and ActivityID I don't need! My object is down to this as IIS AppFabric handles the ActivityID for me.
public override IEnumerable<TypeRegistration> GetRegistrations(string namePrefix)
yield return new TypeRegistration<IExceptionHandler>(
Name = BuildName(namePrefix),
Lifetime = TypeRegistrationLifetime.Transient
The only thing left is how to get more useful information into the Exception.
For example I'd like to maybe append information to inner exception before the
Exception Shielding Policy kicks in. Does the try catch block if included execute prior to the
ExceptionShielding so I could manipulate first. While I wait I'll give it a try....
OK so here is what I tried. I added a try catch block. In the catch I added ex.Data.Add("Parm1", "More Info"); and then threw it out of the catch block where the exceptionShielding then picked it up. So it seems that indeed I can add extra information
to the exception prior to the policy handling it. Which makes sense as the policy is for unhandled so once thrown out of the catch it is unhandled.
Now and this is not your problem I am having trouble accessing the Data parm. I try string x = (string)ex.Data["Parm1"]; but that just gives me an array of two null values????
Anyway if I wanted to post this to Codeplex for others to use should I have it reviewed first or will your team do that before when submitted?