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