Beispiel #1
0
 public void Info(object sender, string message, params object[] parameters)
 {
     try
     {
         db.Create(new InfoEntry(sender, message, parameters));
     }
     catch (Exception ex)
     {
         ex.TryToStore(db, this);
     }
 }
 public static bool TryToStore(this Exception ex, ICrudProvider storage, object source)
 {
     try
     {
         return(storage != null && storage.Create(new ExceptionEntry(source, ex)) == 1);
     }
     catch
     {
         return(false);
     }
 }
 public static bool TryToStore(this Exception ex, ICrudProvider storage, object source)
 {
     try
     {
         return (storage != null && storage.Create(new ExceptionEntry(source, ex)) == 1);
     }
     catch
     {
         return false;
     }
 }