summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/editorconfig/exceptions.py
blob: c25f681adc4c78fe421c4e7f339764b10a2abd85 (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
"""EditorConfig exception classes

Licensed under Simplified BSD License (see LICENSE.BSD file).

"""


class EditorConfigError(Exception):
    """Parent class of all exceptions raised by EditorConfig"""


try:
    from ConfigParser import ParsingError as _ParsingError
except:
    from configparser import ParsingError as _ParsingError


class ParsingError(_ParsingError, EditorConfigError):
    """Error raised if an EditorConfig file could not be parsed"""


class PathError(ValueError, EditorConfigError):
    """Error raised if invalid filepath is specified"""


class VersionError(ValueError, EditorConfigError):
    """Error raised if invalid version number is specified"""