Skip to content

Commit

Permalink
remove deprecated-in-.net8 exception calls
Browse files Browse the repository at this point in the history
also deprecate some unused exception classes
  • Loading branch information
gbirchmeier committed Sep 13, 2024
1 parent a066be3 commit 7169c18
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 34 deletions.
7 changes: 0 additions & 7 deletions QuickFIXn/DataDictionary/DictionaryParseException.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuickFix
{
Expand All @@ -12,9 +9,5 @@ public DictionaryParseException(string message)
: base(message) { }
public DictionaryParseException(string message, System.Exception inner)
: base(message, inner) { }
protected DictionaryParseException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
13 changes: 6 additions & 7 deletions QuickFIXn/DataDictionary/InvalidMessageTypeException.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuickFix
{
[Obsolete("This class will be removed in a future release (because it's unused)")]
public class InvalidMessageTypeException : ApplicationException
{
[Obsolete("This class will be removed in a future release (because it's unused)")]
public InvalidMessageTypeException() { }

[Obsolete("This class will be removed in a future release (because it's unused)")]
public InvalidMessageTypeException(string message)
: base(message) { }

[Obsolete("This class will be removed in a future release (because it's unused)")]
public InvalidMessageTypeException(string message, System.Exception inner)
: base(message, inner) { }
protected InvalidMessageTypeException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
12 changes: 8 additions & 4 deletions QuickFIXn/DataDictionary/MissingRequiredFieldException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@

namespace QuickFix
{
[Obsolete("This class will be removed in a future release (because it's unused)")]
public sealed class MissingRequiredFieldException : ApplicationException
{
[Obsolete("This class will be removed in a future release (because it's unused)")]
public MissingRequiredFieldException() { }

[Obsolete("This class will be removed in a future release (because it's unused)")]
public MissingRequiredFieldException(int field)
: base("Missing required field: " + field.ToString()) { }

[Obsolete("This class will be removed in a future release (because it's unused)")]
public MissingRequiredFieldException(string message)
: base(message) { }

[Obsolete("This class will be removed in a future release (because it's unused)")]
public MissingRequiredFieldException(string message, System.Exception inner)
: base(message, inner) { }
protected MissingRequiredFieldException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
11 changes: 1 addition & 10 deletions QuickFIXn/Exceptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using System;
using System;

namespace QuickFix
{
Expand All @@ -16,10 +15,6 @@ public QuickFIXException(string msg)
public QuickFIXException(string msg, System.Exception innerException)
: base(msg, innerException)
{ }

public QuickFIXException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{ }
}

/// <summary>
Expand Down Expand Up @@ -109,10 +104,6 @@ public InvalidMessage(string msg)
public InvalidMessage(string msg, System.Exception innerException)
: base("Invalid message: " + msg, innerException)
{ }

public InvalidMessage(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{ }
}

/// <summary>
Expand Down
6 changes: 0 additions & 6 deletions QuickFIXn/Message/FieldNotFoundException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,5 @@ public FieldNotFoundException(string message)
public FieldNotFoundException(string message, System.Exception inner)
: base(message, inner)
{ Field = -1; }

protected FieldNotFoundException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{ }
}
}

0 comments on commit 7169c18

Please sign in to comment.