mirror of https://github.com/SixLabors/ImageSharp
committed by
GitHub
31 changed files with 121 additions and 106 deletions
@ -1,23 +1,33 @@ |
|||
// Copyright (c) Six Labors.
|
|||
// Licensed under the Six Labors Split License.
|
|||
|
|||
using System.Diagnostics.CodeAnalysis; |
|||
|
|||
namespace SixLabors.ImageSharp.Compression.Zlib; |
|||
|
|||
internal static class DeflateThrowHelper |
|||
{ |
|||
[DoesNotReturn] |
|||
public static void ThrowAlreadyFinished() => throw new InvalidOperationException("Finish() already called."); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowAlreadyClosed() => throw new InvalidOperationException("Deflator already closed."); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowUnknownCompression() => throw new InvalidOperationException("Unknown compression function."); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowNotProcessed() => throw new InvalidOperationException("Old input was not completely processed."); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowNull(string name) => throw new ArgumentNullException(name); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowOutOfRange(string name) => throw new ArgumentOutOfRangeException(name); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowHeapViolated() => throw new InvalidOperationException("Huffman heap invariant violated."); |
|||
|
|||
[DoesNotReturn] |
|||
public static void ThrowNoDeflate() => throw new ImageFormatException("Cannot deflate all input."); |
|||
} |
|||
|
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:f129b057efb499d492e9afcffdd98de62aac1e04b97a09a75b4799ba498cd3c1 |
|||
size 319056 |
|||
Loading…
Reference in new issue