Mercurial > hg
comparison mercurial/ui.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 | 21733e8c924f |
children | e5a0efd26f7a |
comparison
equal
deleted
inserted
replaced
45876:568c05d8f3d2 | 45877:ac362d5a7893 |
---|---|
1850 editor = self.geteditor() | 1850 editor = self.geteditor() |
1851 | 1851 |
1852 self.system( | 1852 self.system( |
1853 b"%s \"%s\"" % (editor, name), | 1853 b"%s \"%s\"" % (editor, name), |
1854 environ=environ, | 1854 environ=environ, |
1855 onerr=error.Abort, | 1855 onerr=error.CanceledError, |
1856 errprefix=_(b"edit failed"), | 1856 errprefix=_(b"edit failed"), |
1857 blockedtag=b'editor', | 1857 blockedtag=b'editor', |
1858 ) | 1858 ) |
1859 | 1859 |
1860 with open(name, 'rb') as f: | 1860 with open(name, 'rb') as f: |