StorageError.swift 484 B

12345678910111213141516171819
  1. import Foundation
  2. public enum StorageError: Error {
  3. /// Object can not be found
  4. case notFound
  5. /// Object is found, but casting to requested type failed
  6. case typeNotMatch
  7. /// The file attributes are malformed
  8. case malformedFileAttributes
  9. /// Can't perform Decode
  10. case decodingFailed
  11. /// Can't perform Encode
  12. case encodingFailed
  13. /// The storage has been deallocated
  14. case deallocated
  15. /// Fail to perform transformation to or from Data
  16. case transformerFail
  17. }