Skip to content

Commit

Permalink
Tuple: fix TryUnpack that could throw exceptions in some conditions, …
Browse files Browse the repository at this point in the history
…instead of returning false

- fix FailLegacyTupleNotSupported to return an Exception instead of throwing
  • Loading branch information
KrzysFR committed Jul 3, 2024
1 parent 003e44b commit 15408d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doxense.Core/Tuples/Encoding/TupleParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ public static T VisitNext<T>(ref TupleReader reader, Func<Slice, TupleSegmentTyp
[Pure, MethodImpl(MethodImplOptions.NoInlining)]
internal static Exception FailLegacyTupleNotSupported()
{
throw new FormatException("Old style embedded tuples (0x03) are not supported anymore.");
return new FormatException("Old style embedded tuples (0x03) are not supported anymore.");
}

#endregion
Expand Down

0 comments on commit 15408d7

Please sign in to comment.