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

1# http://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

4# ---|P------/S----------~Lg---------- 

5 

6''' 

7Squirrel exception definitions. 

8''' 

9 

10 

11class SquirrelError(Exception): 

12 ''' 

13 Base class for errors raised by the Pyrocko Squirrel framework. 

14 ''' 

15 pass 

16 

17 

18class NotAvailable(SquirrelError): 

19 ''' 

20 Raised when a required data entity cannot be found. 

21 ''' 

22 pass 

23 

24 

25class Duplicate(SquirrelError): 

26 ''' 

27 Raised when a query leads to multiple/ambiguous results. 

28 ''' 

29 pass 

30 

31 

32class Inconsistencies(SquirrelError): 

33 ''' 

34 Raised when there is an inconsistency between two or more related entities. 

35 ''' 

36 pass 

37 

38 

39class ConversionError(SquirrelError): 

40 ''' 

41 Raised when a conversion failed. 

42 ''' 

43 pass 

44 

45 

46class ToolError(Exception): 

47 ''' 

48 Raised by Squirrel CLI tools to request a graceful exit on error. 

49 ''' 

50 pass 

51 

52 

53__all__ = [ 

54 'SquirrelError', 

55 'NotAvailable', 

56 'Duplicate', 

57 'Inconsistencies', 

58 'ConversionError', 

59 'ToolError']