Mercurial > public > mercurial-scm > hg
comparison mercurial/error.py @ 45840:527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
This very similar to an earlier patch (which was for `InputError`).
In this patch, I also updated the transplant extension only because
`test-transplant.t` would otherwise have needed a `#if continueflag`.
Differential Revision: https://phab.mercurial-scm.org/D9310
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 12 Oct 2020 12:44:18 -0700 |
parents | 8d72e29ad1e0 |
children | ac362d5a7893 |
comparison
equal
deleted
inserted
replaced
45839:ebee234d952a | 45840:527ce85c2e60 |
---|---|
183 | 183 |
184 class InputError(Abort): | 184 class InputError(Abort): |
185 """Indicates that the user made an error in their input. | 185 """Indicates that the user made an error in their input. |
186 | 186 |
187 Examples: Invalid command, invalid flags, invalid revision. | 187 Examples: Invalid command, invalid flags, invalid revision. |
188 """ | |
189 | |
190 | |
191 class StateError(Abort): | |
192 """Indicates that the operation might work if retried in a different state. | |
193 | |
194 Examples: Unresolved merge conflicts, unfinished operations. | |
188 """ | 195 """ |
189 | 196 |
190 | 197 |
191 class HookLoadError(Abort): | 198 class HookLoadError(Abort): |
192 """raised when loading a hook fails, aborting an operation | 199 """raised when loading a hook fails, aborting an operation |