Skip to content

Commit

Permalink
Merge pull request #379 from RenderMichael/master
Browse files Browse the repository at this point in the history
Only log to Error in DEBUG mode
  • Loading branch information
ststeiger authored Aug 26, 2023
2 parents c13fedf + ea89f52 commit c918cbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PdfSharpCore/Utils/FontResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ public static void SetupFontsFiles(string[] sSupportedFonts)
}
catch (System.Exception e)

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'e' is declared but never used

Check warning on line 126 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'e' is declared but never used
{
#if DEBUG
System.Console.Error.WriteLine(e);
#endif
}
}

Expand All @@ -139,7 +141,9 @@ public static void SetupFontsFiles(string[] sSupportedFonts)
}
catch (System.Exception e)

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'e' is declared but never used

Check warning on line 142 in PdfSharpCore/Utils/FontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'e' is declared but never used
{
#if DEBUG
System.Console.Error.WriteLine(e);
#endif
}
}

Expand Down
4 changes: 4 additions & 0 deletions PdfSharpCore/Utils/LinuxSystemFontResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ public static string[] Resolve()
}
catch(Exception ex)

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used

Check warning on line 137 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used
{
#if DEBUG
Console.Error.WriteLine(ex.ToString());
#endif
return ResolveFallback().Where(x => x.EndsWith(".ttf", StringComparison.OrdinalIgnoreCase)).ToArray();
}
}
Expand Down Expand Up @@ -194,8 +196,10 @@ static IEnumerable<string> SearchPaths()
}
catch (Exception ex)

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (3.1.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (5.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (6.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used

Check warning on line 197 in PdfSharpCore/Utils/LinuxSystemFontResolver.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The variable 'ex' is declared but never used
{
#if DEBUG
Console.Error.WriteLine(ex.Message);
Console.Error.WriteLine(ex.StackTrace);
#endif
}

dirs.Add("/usr/share/fonts");
Expand Down

0 comments on commit c918cbf

Please sign in to comment.