summaryrefslogtreecommitdiff
path: root/lib/fatfs/fatfs_utils/exceptions.py
blob: a3a27df5d6eeb60b3034dfdea8a822c165db252f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0

class WriteDirectoryException(Exception):
    """
    Exception is raised when the user tries to write the content into the directory instead of file
    """
    pass


class NoFreeClusterException(Exception):
    """
    Exception is raised when the user tries allocate cluster but no free one is available
    """
    pass


class LowerCaseException(Exception):
    """
    Exception is raised when the user tries to write file or directory with lower case
    """
    pass


class TooLongNameException(Exception):
    """
    Exception is raised when long name support is not enabled and user tries to write file longer then allowed
    """
    pass


class NotInitialized(Exception):
    """
    Exception is raised when the user tries to access not initialized property
    """
    pass


class WLNotInitialized(Exception):
    """
    Exception is raised when the user tries to write fatfs not initialized with wear levelling
    """
    pass


class FatalError(Exception):
    pass


class InconsistentFATAttributes(Exception):
    """
    Caused by e.g. wrong number of clusters for given FAT type
    """
    pass