1"""Commonly used exception classes."""
2
3import builtins as _builtins
4
5from .backend.execute import ExecutableNotFound, CalledProcessError
6
7__all__ = ['ExecutableNotFound', 'CalledProcessError',
8 'RequiredArgumentError', 'FileExistsError',
9 'UnknownSuffixWarning', 'FormatSuffixMismatchWarning',
10 'DotSyntaxWarning']
11
12
13class RequiredArgumentError(TypeError):
14 """:exc:`TypeError` raised if a required argument is missing."""
15
16
17class FileExistsError(_builtins.FileExistsError):
18 """:exc:`FileExistsError` raised with ``raise_if_exists=True``."""
19
20
21class UnknownSuffixWarning(RuntimeWarning):
22 """:exc:`RuntimeWarning` raised if the suffix of ``outfile`` is unknown
23 and the given ``format`` is used instead."""
24
25
26class FormatSuffixMismatchWarning(UserWarning):
27 """:exc:`UserWarning` raised if the suffix ``outfile``
28 does not match the given ``format``."""
29
30
31class DotSyntaxWarning(RuntimeWarning):
32 """:exc:`RuntimeWarning` raised if a quoted string
33 is expected to cause a ``CalledProcessError`` from rendering."""