// Copyright (c) 2018 Timofey Solomko
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

/**
 Represents an error, which happened during processing TAR container.
 It may indicate that either container is damaged or it might not be TAR container at all.
 */
public enum TarError: Error {
    /// Size of data is too small, even to contain only one header.
    case tooSmallFileIsPassed
    /**
     Failed to process a TAR header's field.

     - Note: This error case is never thrown and will be removed in a future major update.
     */
    case wrongField
    /// Computed checksum of a header doesn't match the value stored in container.
    case wrongHeaderChecksum
    /// Entry from PAX extended header is in incorrect format.
    case wrongPaxHeaderEntry
}

// Copyright (c) 2018 Timofey Solomko
// Licensed under MIT License
//
// See LICENSE for license information

import Foundation

/**
 Represents an error, which happened during processing TAR container.
 It may indicate that either container is damaged or it might not be TAR container at all.
 */
public enum TarError: Error {
    /// Size of data is too small, even to contain only one header.
    case tooSmallFileIsPassed
    /// Failed to process a TAR header's field.
    case wrongField
    /// Computed checksum of a header doesn't match the value stored in container.
    case wrongHeaderChecksum
    /// Entry from PAX extended header is in incorrect format.
    case wrongPaxHeaderEntry
}

--- 
+++ 
@@ -12,7 +12,11 @@
 public enum TarError: Error {
     /// Size of data is too small, even to contain only one header.
     case tooSmallFileIsPassed
-    /// Failed to process a TAR header's field.
+    /**
+     Failed to process a TAR header's field.
+
+     - Note: This error case is never thrown and will be removed in a future major update.
+     */
     case wrongField
     /// Computed checksum of a header doesn't match the value stored in container.
     case wrongHeaderChecksum
[TAR] Add notes about wrongField being unused into its doc comment
