namespace AyCode.Core.Serializers.Binaries;

/// <summary>
/// Exception thrown when binary deserialization fails.
/// </summary>
public class AcBinaryDeserializationException : Exception
{
    public int Position { get; }
    public Type? TargetType { get; }

    public AcBinaryDeserializationException(string message, int position = 0, Type? targetType = null, Exception? innerException = null)
        : base(message, innerException)
    {
        Position = position;
        TargetType = targetType;
    }
}