title: How do I add the SqlException type to a custom tracking participant?
body: <p>I'm getting the following (intermittent) errors in my workflow tracking:</p>
  
  <blockquote>
    <p>"An error occurred while
    calling tracking participants causing
    the instance to be aborted.  See the
    inner exception for more details.
    InnerException Message: Type
    'System.Data.SqlClient.SqlException'
    with data contract name
    'SqlException:http://schemas.datacontract.org/2004/07/System.Data.SqlClient'
    is not expected. Consider using a
    DataContractResolver or add any types
    not known statically to the list of
    known types - for example, by using
    the KnownTypeAttribute attribute or by
    adding them to the list of known types
    passed to
    DataContractSerializer."</p>
  </blockquote>
  
  <p>My custom tracking participant looks something like this:</p>
  
  <pre><code>            protected override void Track (TrackingRecord record, TimeSpan timeout)
              {
  
                StringWriter sw = null;
                if (record == null) throw new ArgumentNullException("record");
                if (timeout == null) throw new ArgumentNullException("timeout");
                StringBuilder sb = new StringBuilder();
                sw = new StringWriter(sb);
  
                using (XmlTextWriter writer = new XmlTextWriter(sw) { Formatting = Formatting.Indented })
                {
                    DataContractSerializer serializer = new DataContractSerializer(record.GetType());
                    serializer.WriteObject(writer, record);
                    writer.Flush();
                    writer.Close();
                }
  
  
                _logger.Log(sb.ToString());
              }
  </code></pre>
  
  <p>How do I go about resolving this?</p>
  
  <p>Also, are there any other types that workflow might throw at me that I haven't seen yet but need to handle in my tracking participant?</p>