Compare commits
1 commit
master
...
throw-canc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed4099eb12 |
2 changed files with 14 additions and 1 deletions
13
src/SharpCompress/Common/ReaderCancelledException.cs
Normal file
13
src/SharpCompress/Common/ReaderCancelledException.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace SharpCompress.Common;
|
||||
|
||||
public class ReaderCancelledException : Exception
|
||||
|
||||
{
|
||||
public ReaderCancelledException(string message)
|
||||
: base(message) { }
|
||||
|
||||
public ReaderCancelledException(string message, Exception inner)
|
||||
: base(message, inner) { }
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ public abstract class AbstractReader<TEntry, TVolume> : IReader, IReaderExtracti
|
|||
}
|
||||
if (Cancelled)
|
||||
{
|
||||
throw new InvalidOperationException("Reader has been cancelled.");
|
||||
throw new ReaderCancelledException("Reader has been cancelled.");
|
||||
}
|
||||
if (entriesForCurrentReadStream is null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue