File: exceptions.py

package info (click to toggle)
editorconfig-core-py 0.12.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 220 kB
  • sloc: python: 502; sh: 16; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (4)
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"""