title: Exception.Data info is missing in EntLib log
body: <p>How do I get the Exception Handling Application Block (EHAB) to write the values from the Exception.Data property in the log? </p>
  
  <pre><code>  try
    {
      // ...
    }
    catch (Exception ex)
    {
      ex.Data.Add("Hello", "World");
      throw ex;
    }
  </code></pre>
  
  <p>The exception is logged correctly, but I can’t find the added data anywhere in the log entry created by EHAB.</p>
  
  <p>As far as I understand, it’s a recommended practice to add additional relevant information to the exception itself like in the above example. That’s why I’m a little surprised that EHAB doesn’t include this by default.</p>
  
  <p>Can I fix this by modifying the template with the EntLib Text Formatter Template Editor (screen shot below)? I can't find any info on the various "tokens" provided, but I assume the answer is hidden somewhere with them. </p>
  
  <p><a href="http://img195.imageshack.us/img195/6614/capturegmg.png">Text Formatter Template Editor http://img195.imageshack.us/img195/6614/capturegmg.png</a></p>
  
  <p>Or do I really need to implement my own custom Text Formatter to accomplish this?</p>
  
  <p><strong>EDIT/UPDATE:</strong></p>
  
  <p>I do this in my Global.asax.cs in order to avoid having to add the HandleException method call everywhere in my code:</p>
  
  <pre><code>using EntLib = Microsoft.Practices.EnterpriseLibrary;
  using System;
  
  namespace MyApp
  {
    public class Global : System.Web.HttpApplication
    {
      protected void Application_Error(object sender, EventArgs e)
      {
        // I have an "All Exceptions" policy in place...
        EntLib.ExceptionHandling.ExceptionPolicy.HandleException(Server.GetLastError(), "All Exceptions");
        // I believe it's the GetLastError that's somehow returning a "lessor" exception
      }
    }
  }
  </code></pre>
  
  <p>It turns out this is <em>not</em> the same as this (which works fine, and essentially solves my problem):</p>
  
  <pre><code>try
  {
    // ...
  }
  catch (Exception ex)
  {
    ex.Data.Add("Hello", "World");
    bool rethrow = ExceptionPolicy.HandleException(ex, "Log Only Policy");
    throw ex;
  }
  </code></pre>
  
  <p>Going through all the code and adding try-catch's with a HandleException call just seems ... well, stupid. 
  I guess my problem really is how to <em>use</em> EHAB correctly, not configuration.</p>
  
  <p>Any suggestion on how I can <em>properly</em> log all exceptions on a "global level" in an ASP.NET web application??</p>