comparison mercurial/error.py @ 45930:8f50dc096cf4

errors: introduce SecurityError and use it in a few places This is part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There are perhaps more errors in `sslutil.py` that should raise `SecurityError`; I picked the most clear ones to start with. Differential Revision: https://phab.mercurial-scm.org/D9390
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 23 Nov 2020 16:20:02 -0800
parents 64faa55716f4
children 89a2afe31e82
comparison
equal deleted inserted replaced
45929:be25b66f86ab 45930:8f50dc096cf4
211 211
212 class CanceledError(Abort): 212 class CanceledError(Abort):
213 """Indicates that the user canceled the operation. 213 """Indicates that the user canceled the operation.
214 214
215 Examples: Close commit editor with error status, quit chistedit. 215 Examples: Close commit editor with error status, quit chistedit.
216 """
217
218
219 class SecurityError(Abort):
220 """Indicates that some aspect of security failed.
221
222 Examples: Bad server credentials, expired local credentials for network
223 filesystem, mismatched GPG signature, DoS protection.
216 """ 224 """
217 225
218 226
219 class HookLoadError(Abort): 227 class HookLoadError(Abort):
220 """raised when loading a hook fails, aborting an operation 228 """raised when loading a hook fails, aborting an operation