Use more SC exceptions instead of generic ones

This commit is contained in:
Adam Hathcock
2026-02-16 12:40:07 +00:00
parent 0cb9e5e970
commit 855d4b4ce2
113 changed files with 345 additions and 281 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.IO;
using SharpCompress.Common;
using SharpCompress.IO;
using SharpCompress.Test.Mocks;
using Xunit;
@@ -34,7 +35,7 @@ public class SharpCompressStreamEdgeTest
var ms = new MemoryStream(new byte[] { 1, 2, 3, 4, 5 });
var stream = SharpCompressStream.CreateNonDisposing(ms);
stream.ThrowOnDispose = true;
Assert.Throws<InvalidOperationException>(() => stream.Dispose());
Assert.Throws<ArchiveOperationException>(() => stream.Dispose());
}
[Fact]