コード例 #1
0
 private void LogException(Exception ex)
 {
     try
     {
         Log4netHelper.All(x => x.Error(ex.ToString()));
     }
     catch { }
 }
コード例 #2
0
 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;
            }
        }