diff mercurial/scmutil.py @ 45915: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 95c4cca641f6
children aba4f2c97e74
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Nov 23 16:05:03 2020 -0800
+++ b/mercurial/scmutil.py	Mon Nov 23 16:20:02 2020 -0800
@@ -228,6 +228,8 @@
             detailed_exit_code = 20
         elif isinstance(inst, error.ConfigError):
             detailed_exit_code = 30
+        elif isinstance(inst, error.SecurityError):
+            detailed_exit_code = 150
         elif isinstance(inst, error.CanceledError):
             detailed_exit_code = 250
         ui.error(inst.format())