Mercurial > public > mercurial-scm > hg
comparison mercurial/error.py @ 45877:ac362d5a7893
errors: introduce CanceledError and use it in a few places
This very similar to earlier patches (e.g. for `InputError`) and part
of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9339
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 14:14:59 -0700 |
parents | 527ce85c2e60 |
children | 8cc9e7f762d6 |
comparison
equal
deleted
inserted
replaced
45876:568c05d8f3d2 | 45877:ac362d5a7893 |
---|---|
190 | 190 |
191 class StateError(Abort): | 191 class StateError(Abort): |
192 """Indicates that the operation might work if retried in a different state. | 192 """Indicates that the operation might work if retried in a different state. |
193 | 193 |
194 Examples: Unresolved merge conflicts, unfinished operations. | 194 Examples: Unresolved merge conflicts, unfinished operations. |
195 """ | |
196 | |
197 | |
198 class CanceledError(Abort): | |
199 """Indicates that the user canceled the operation. | |
200 | |
201 Examples: Close commit editor with error status, quit chistedit. | |
195 """ | 202 """ |
196 | 203 |
197 | 204 |
198 class HookLoadError(Abort): | 205 class HookLoadError(Abort): |
199 """raised when loading a hook fails, aborting an operation | 206 """raised when loading a hook fails, aborting an operation |