Mercurial > public > mercurial-scm > hg
comparison mercurial/chgserver.py @ 45887:7eb221b9af6c
errors: make ParseError a subtype of Abort
I didn't plan this before, but the previous two changes made it really
easy to make `ParseError` a subtype of `Abort`. It seems obvious with
hindsight that I *should* have planned it :)
Differential Revision: https://phab.mercurial-scm.org/D9350
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 19 Nov 2020 15:13:39 -0800 |
parents | 600aec73f309 |
children | aab70f05d6ec |
comparison
equal
deleted
inserted
replaced
45886:18489e26d9a0 | 45887:7eb221b9af6c |
---|---|
504 the instructions. | 504 the instructions. |
505 """ | 505 """ |
506 args = self._readlist() | 506 args = self._readlist() |
507 try: | 507 try: |
508 self.ui, lui = _loadnewui(self.ui, args, self.cdebug) | 508 self.ui, lui = _loadnewui(self.ui, args, self.cdebug) |
509 except error.ParseError as inst: | |
510 self.ui.warn(inst.format()) | |
511 self.ui.flush() | |
512 self.cresult.write(b'exit 255') | |
513 return | |
514 except error.Abort as inst: | 509 except error.Abort as inst: |
515 self.ui.error(inst.format()) | 510 self.ui.error(inst.format()) |
516 self.ui.flush() | 511 self.ui.flush() |
517 self.cresult.write(b'exit 255') | 512 self.cresult.write(b'exit 255') |
518 return | 513 return |