Esempio n. 1
0
        private void WriteException(ExceptionWrapper ex)
        {
            lock (_lock)
            {
                try
                {
                    var exceptions = GetExceptions();

                    exceptions.Add(ex);

                    File.WriteAllText(_exceptionLogPath, JsonConvert.SerializeObject(exceptions));
                }
                catch { }
            }
        }
Esempio n. 2
0
        public static void Handle(Exception ex)
        {
            var wrapper = new ExceptionWrapper(ex);

            Task.Run(() => Instance.WriteException(wrapper));
        }