Skip to content

Commit 94d4a45

Browse files
committed
all exceptions should inherit from TestgresException
1 parent 55296e9 commit 94d4a45

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

Diff for: testgres/testgres.py

+15-8
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@
7575
DEFAULT_XLOG_METHOD = "fetch"
7676

7777

78-
class ExecUtilException(Exception):
78+
class TestgresException(Exception):
79+
"""
80+
Base exception
81+
"""
82+
pass
83+
84+
85+
class ExecUtilException(TestgresException):
7986
"""
8087
Stores exit code
8188
"""
@@ -85,31 +92,31 @@ def __init__(self, message, exit_code=0):
8592
self.exit_code = exit_code
8693

8794

88-
class ClusterException(Exception):
95+
class ClusterTestgresException(TestgresException):
8996
pass
9097

9198

92-
class QueryException(Exception):
99+
class QueryException(TestgresException):
93100
pass
94101

95102

96-
class TimeoutException(Exception):
103+
class TimeoutException(TestgresException):
97104
pass
98105

99106

100-
class StartNodeException(Exception):
107+
class StartNodeException(TestgresException):
101108
pass
102109

103110

104-
class InitNodeException(Exception):
111+
class InitNodeException(TestgresException):
105112
pass
106113

107114

108-
class BackupException(Exception):
115+
class BackupException(TestgresException):
109116
pass
110117

111118

112-
class CatchUpException(Exception):
119+
class CatchUpException(TestgresException):
113120
pass
114121

115122

0 commit comments

Comments
 (0)