Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/error.py @ 45677:bdd2cdf9e248
errors: move UnknownCommand and AmbiguousCommand near CommandError
They seem closely related.
Differential Revision: https://phab.mercurial-scm.org/D9163
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 06 Oct 2020 21:52:27 -0700 |
parents | bd5b2b29b82d |
children | bd2df58366b1 |
comparison
equal
deleted
inserted
replaced
45676:f95b23283760 | 45677:bdd2cdf9e248 |
---|---|
97 pass | 97 pass |
98 | 98 |
99 | 99 |
100 class CommandError(Exception): | 100 class CommandError(Exception): |
101 """Exception raised on errors in parsing the command line.""" | 101 """Exception raised on errors in parsing the command line.""" |
102 | |
103 __bytes__ = _tobytes | |
104 | |
105 | |
106 class UnknownCommand(Exception): | |
107 """Exception raised if command is not in the command table.""" | |
108 | |
109 __bytes__ = _tobytes | |
110 | |
111 | |
112 class AmbiguousCommand(Exception): | |
113 """Exception raised if command shortcut matches more than one command.""" | |
102 | 114 |
103 __bytes__ = _tobytes | 115 __bytes__ = _tobytes |
104 | 116 |
105 | 117 |
106 class InterventionRequired(Hint, Exception): | 118 class InterventionRequired(Hint, Exception): |
284 __bytes__ = _tobytes | 296 __bytes__ = _tobytes |
285 | 297 |
286 | 298 |
287 class ResponseError(Exception): | 299 class ResponseError(Exception): |
288 """Raised to print an error with part of output and exit.""" | 300 """Raised to print an error with part of output and exit.""" |
289 | |
290 __bytes__ = _tobytes | |
291 | |
292 | |
293 class UnknownCommand(Exception): | |
294 """Exception raised if command is not in the command table.""" | |
295 | |
296 __bytes__ = _tobytes | |
297 | |
298 | |
299 class AmbiguousCommand(Exception): | |
300 """Exception raised if command shortcut matches more than one command.""" | |
301 | 301 |
302 __bytes__ = _tobytes | 302 __bytes__ = _tobytes |
303 | 303 |
304 | 304 |
305 # derived from KeyboardInterrupt to simplify some breakout code | 305 # derived from KeyboardInterrupt to simplify some breakout code |