Show More
@@ -91,13 +91,16 b' class Abort(Error):' | |||
|
91 | 91 | """Raised if a command needs to print an error and exit.""" |
|
92 | 92 | |
|
93 | 93 | |
|
94 |
class StorageError( |
|
|
94 | class StorageError(Error): | |
|
95 | 95 | """Raised when an error occurs in a storage layer. |
|
96 | 96 | |
|
97 | 97 | Usually subclassed by a storage-specific exception. |
|
98 | 98 | """ |
|
99 | 99 | |
|
100 | __bytes__ = _tobytes | |
|
100 | def __init__(self, message, hint=None): | |
|
101 | super(StorageError, self).__init__( | |
|
102 | message, hint=hint, detailed_exit_code=50 | |
|
103 | ) | |
|
101 | 104 | |
|
102 | 105 | |
|
103 | 106 | class RevlogError(StorageError): |
@@ -198,11 +198,6 b' def callcatch(ui, func):' | |||
|
198 | 198 | ui.error(b"\n%r\n" % pycompat.bytestr(stringutil.ellipsis(msg))) |
|
199 | 199 | except error.CensoredNodeError as inst: |
|
200 | 200 | ui.error(_(b"abort: file censored %s\n") % inst) |
|
201 | except error.StorageError as inst: | |
|
202 | ui.error(_(b"abort: %s\n") % inst) | |
|
203 | if inst.hint: | |
|
204 | ui.error(_(b"(%s)\n") % inst.hint) | |
|
205 | detailed_exit_code = 50 | |
|
206 | 201 | except error.WdirUnsupported: |
|
207 | 202 | ui.error(_(b"abort: working directory revision cannot be specified\n")) |
|
208 | 203 | except error.Error as inst: |
General Comments 0
You need to be logged in to leave comments.
Login now