private void FillFailureDetails(Dictionary<string, object> entryProperties, Failure failure)
 {
     var details = entryProperties.Where(e => e.Key != ExceptionEntry.EXCEPTION_PROPERTY).ToDictionary(e => e.Key, e => e.Value.ToString());
     if (entryProperties.ContainsKey(ExceptionEntry.EXCEPTION_PROPERTY))
     {
         var exception = entryProperties[ExceptionEntry.EXCEPTION_PROPERTY] as ExceptionEntryProperty;
         details.Add("exceptionMessage", exception.Exception.Message);
         details.Add("exceptionStack", exception.Exception.StackTrace);
     }
     failure.Details = details;
 }
 private void FillFailure(pt.sapo.gis.trace.Entry entry, List<Failure> failures, EntryFilterHandler filter)
 {
     // only add entry if there is no filter or it pass the filter test
     if (filter(entry))
     {
         Failure failure = new Failure
         {
             FailureID = GetFailureCodeFromEntry(entry),
             SourceID = entry.Properties.ContainsKey(FAILURE_SOURCE_ID_PROPERTY) ? entry.Properties[FAILURE_SOURCE_ID_PROPERTY] as String : (TraceManager.Trace.Properties.ContainsKey(REPORT_SOURCE_ID_PROPERTY) ? TraceManager.Trace.Properties[REPORT_SOURCE_ID_PROPERTY] as String : Properties.DefaultSourceId),
             //Details = entry.Properties.Where(e => e.Key != FAILURE_SOURCE_ID_PROPERTY).ToDictionary(x => x.Key, x => x.Value) //correction for exceptionEntries
         };
         FillFailureDetails(entry.Properties.Where(e => e.Key != FAILURE_SOURCE_ID_PROPERTY).ToDictionary(x => x.Key, x => x.Value), failure);
         failures.Add(failure);
     }
 }