CodeWalker/CodeWalker.Core/Utils/ThrowHelper.cs
Niek Schoemaker 8c2e444049
Update to .NET 6
Added Span support in some places already, and changed Nullable to annotations to declare intent to enable nullable at some point in the future
2023-11-14 16:16:59 +01:00

23 lines
538 B
C#

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeWalker.Core.Utils
{
internal class ThrowHelper
{
internal static Exception CreateEndOfFileException() =>
new EndOfStreamException("Tried to read stream beyond end");
[DoesNotReturn]
internal static void ThrowEndOfFileException()
{
throw CreateEndOfFileException();
}
}
}