Skip to content

Commit

Permalink
Fix warnings for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwille committed Nov 22, 2023
1 parent 26b3d0d commit 5564793
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion ICSharpCode.AvalonEdit/Editing/DragDropException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ public DragDropException(string message) : base(message)
public DragDropException(string message, Exception innerException) : base(message, innerException)
{
}

#if !NET6_0_OR_GREATER
/// <summary>
/// Deserializes a DragDropException.
/// </summary>
protected DragDropException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ public HighlightingDefinitionInvalidException(string message) : base(message)
public HighlightingDefinitionInvalidException(string message, Exception innerException) : base(message, innerException)
{
}

#if !NET6_0_OR_GREATER
/// <summary>
/// Creates a new HighlightingDefinitionInvalidException instance.
/// </summary>
protected HighlightingDefinitionInvalidException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ public VisualLinesInvalidException(string message) : base(message)
public VisualLinesInvalidException(string message, Exception innerException) : base(message, innerException)
{
}

#if !NET6_0_OR_GREATER
/// <summary>
/// Creates a new VisualLinesInvalidException instance.
/// </summary>
protected VisualLinesInvalidException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
}
3 changes: 2 additions & 1 deletion ICSharpCode.AvalonEdit/Search/ISearchStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ public SearchPatternException(string message) : base(message)
public SearchPatternException(string message, Exception innerException) : base(message, innerException)
{
}

#if !NET6_0_OR_GREATER
// This constructor is needed for serialization.
/// <inheritdoc/>
protected SearchPatternException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
}

0 comments on commit 5564793

Please sign in to comment.