Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/error.py Mon Nov 23 16:05:03 2020 -0800 +++ b/mercurial/error.py Mon Nov 23 16:20:02 2020 -0800 @@ -216,6 +216,14 @@ """ +class SecurityError(Abort): + """Indicates that some aspect of security failed. + + Examples: Bad server credentials, expired local credentials for network + filesystem, mismatched GPG signature, DoS protection. + """ + + class HookLoadError(Abort): """raised when loading a hook fails, aborting an operation