Coverage for /usr/local/lib/python3.11/dist-packages/pyrocko/squirrel/error.py: 100%
14 statements
« prev ^ index » next coverage.py v6.5.0, created at 2024-01-02 12:31 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2024-01-02 12:31 +0000
1# http://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6'''
7Squirrel exception definitions.
8'''
11class SquirrelError(Exception):
12 '''
13 Base class for errors raised by the Pyrocko Squirrel framework.
14 '''
15 pass
18class NotAvailable(SquirrelError):
19 '''
20 Raised when a required data entity cannot be found.
21 '''
22 pass
25class Duplicate(SquirrelError):
26 '''
27 Raised when a query leads to multiple/ambiguous results.
28 '''
29 pass
32class Inconsistencies(SquirrelError):
33 '''
34 Raised when there is an inconsistency between two or more related entities.
35 '''
36 pass
39class ConversionError(SquirrelError):
40 '''
41 Raised when a conversion failed.
42 '''
43 pass
46class ToolError(Exception):
47 '''
48 Raised by Squirrel CLI tools to request a graceful exit on error.
49 '''
50 pass
53__all__ = [
54 'SquirrelError',
55 'NotAvailable',
56 'Duplicate',
57 'Inconsistencies',
58 'ConversionError',
59 'ToolError']