exceptions.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Apache-2.0
  3. class WriteDirectoryException(Exception):
  4. """
  5. Exception is raised when the user tries to write the content into the directory instead of file
  6. """
  7. pass
  8. class NoFreeClusterException(Exception):
  9. """
  10. Exception is raised when the user tries allocate cluster but no free one is available
  11. """
  12. pass
  13. class LowerCaseException(Exception):
  14. """
  15. Exception is raised when the user tries to write file or directory with lower case
  16. """
  17. pass
  18. class TooLongNameException(Exception):
  19. """
  20. Exception is raised when long name support is not enabled and user tries to write file longer then allowed
  21. """
  22. pass
  23. class NotInitialized(Exception):
  24. """
  25. Exception is raised when the user tries to access not initialized property
  26. """
  27. pass
  28. class WLNotInitialized(Exception):
  29. """
  30. Exception is raised when the user tries to write fatfs not initialized with wear levelling
  31. """
  32. pass
  33. class FatalError(Exception):
  34. pass
  35. class InconsistentFATAttributes(Exception):
  36. """
  37. Caused by e.g. wrong number of clusters for given FAT type
  38. """
  39. pass