Пример #1
0
 private void LogException(Exception ex)
 {
     try
     {
         Log4netHelper.All(x => x.Error(ex.ToString()));
     }
     catch { }
 }
 static void AppDomainException(object sender, UnhandledExceptionEventArgs e)
 {
     try
     {
         var exception = (Exception)e.ExceptionObject;
         Log4netHelper.All(x => x.Error($"AppDomain Unhandled exception: {exception.ToString()}."));
     }
     catch { }
 }
Пример #3
0
        public void TakeScreenshotAndGenerateThumbnail(string url, string localPath)
        {
            this.EnsureParameters(url, localPath);

            try
            {
                RetryHelper.Do(() => this.TakeScreenshotAndGenerateThumbnailInternal(url, localPath), this.ShouldRetry);
            }
            catch (Exception ex)
            {
                var exception = new WebScreenshotTakerAppException(ex);

                Log4netHelper.All(x => x.Error($"{exception.ToString()}"));

                throw exception;
            }
        }