Sfoglia il codice sorgente

Miscellaneous Bugfixes

frankvandenbos 4 mesi fa
parent
commit
d930b07222

+ 14 - 1
InABox.Core/CoreTable/CoreTable.cs

@@ -232,7 +232,20 @@ namespace InABox.Core
             var result = new Dictionary<TKey, TValue>();
             var sorted = sort == null ? Rows : Rows.OrderBy(x => x.Get(sort)).ToList();
             foreach (var row in Rows)
-                result[row.Get(key)] = row.Get(value);
+            {
+                var okey = row.Get(key);
+                var oval = row.Get(value);
+                try
+                {
+                    result[okey] = oval;
+                }
+                catch (Exception e)
+                {
+                    Logger.Send(LogType.Error,"", string.Format("*** Unknown Error: {0}\n{1}", e.Message, e.StackTrace));
+                }
+                
+            }
+
             return result;
         }
 

+ 1 - 1
inabox.wpf/Forms/MessageWindow.xaml.cs

@@ -326,7 +326,7 @@ public partial class MessageWindow : Window, INotifyPropertyChanged
 
     private static void EmailLogs_Click(Exception e)
     {
-        var logFile = CoreUtils.GetVersion();
+        var logFile = Path.Combine(CoreUtils.GetPath(), $"{DateTime.Today:yyyy-MM-dd}.log");
 
         const int nRead = 1024 * 1024;