Log extended data for inner exceptions

Topics: Exception Handling Application Block
May 6, 2014 at 2:34 PM
Edited May 6, 2014 at 2:37 PM
In EntLib 5 I was always missing a possibility to log the extended data for inner exceptions.
E.g. in the code below the "root_prop" will be logged
        try
        {
            try
            {
                Exception inner = new Exception("Inner Exception");
                inner.Data.Add("prop", "inner");
                throw inner;
            }
            catch (Exception ex)
            {
                Exception root = new Exception("Root exception", ex);
                throw root;
            }
        }
        catch (Exception ex)
        {
            ex.Data.Add("root_prop", "root");
            // Log ex here with EHAB
        }

I wonder has it been changed in EntLib 6?
If not,
  • could you suggest a workaround to achieve it?
  • would it be a great feature to implement?