Selaa lähdekoodia

Added Logging to identify cause of Deletion Exceptions

Frank van den Bos 2 vuotta sitten
vanhempi
commit
be2542d397
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      InABox.Database/Stores/Store.cs

+ 3 - 2
InABox.Database/Stores/Store.cs

@@ -778,8 +778,9 @@ namespace InABox.Database
                 }
                 }
                 catch (Exception e)
                 catch (Exception e)
                 {
                 {
+                    Logger.Send(LogType.Error, "", $"Error in DoDelete(T entity, string auditnote):\n{CoreUtils.FormatException(e)}");
                     //CloseSession("Delete", true);
                     //CloseSession("Delete", true);
-                    throw e;
+                    //throw e;
                 }
                 }
                 //CloseSession("Delete",true);
                 //CloseSession("Delete",true);
 
 
@@ -817,8 +818,8 @@ namespace InABox.Database
                 }
                 }
                 catch (Exception e)
                 catch (Exception e)
                 {
                 {
+                    Logger.Send(LogType.Error, "", $"Error in DoDelete(IEnumerable<T> entities, string auditnote):\n{CoreUtils.FormatException(e)}");
                     ////CloseSession("Delete", true);
                     ////CloseSession("Delete", true);
-                    throw e;
                 }
                 }
 
 
                 ////CloseSession("Delete", true);
                 ////CloseSession("Delete", true);