Skip to content

Commit

Permalink
Conditionalize the formatter based serialization bits in InvalidFontF…
Browse files Browse the repository at this point in the history
…ormatException
  • Loading branch information
Numpsy authored and BobLd committed May 6, 2024
1 parent c6a7a2d commit 2cf8762
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
namespace UglyToad.PdfPig.Fonts
{
using System;
#if !NET
using System.Runtime.Serialization;
#endif

/// <summary>
/// The exception thrown when an error is encountered parsing a font from the PDF document.
/// This occurs where the format of the font program or dictionary does not meet the specification.
/// </summary>
/// <inheritdoc cref="Exception"/>
#if !NET
[Serializable]
#endif
public class InvalidFontFormatException : Exception
{
/// <inheritdoc />
Expand All @@ -26,11 +30,13 @@ public InvalidFontFormatException(string message, Exception inner) : base(messag
{
}

#if !NET
/// <inheritdoc />
protected InvalidFontFormatException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
#endif
}
}

0 comments on commit 2cf8762

Please sign in to comment.