changeset 31646:e960eba3581c

merge: use ProgrammingError
author Jun Wu <quark@fb.com>
date Sun, 26 Mar 2017 16:55:56 -0700
parents 7095e783958d
children 4dbef666c6c9
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sun Mar 26 16:53:28 2017 -0700
+++ b/mercurial/merge.py	Sun Mar 26 16:55:56 2017 -0700
@@ -315,13 +315,15 @@
     @util.propertycache
     def localctx(self):
         if self._local is None:
-            raise RuntimeError("localctx accessed but self._local isn't set")
+            msg = "localctx accessed but self._local isn't set"
+            raise error.ProgrammingError(msg)
         return self._repo[self._local]
 
     @util.propertycache
     def otherctx(self):
         if self._other is None:
-            raise RuntimeError("otherctx accessed but self._other isn't set")
+            msg = "otherctx accessed but self._other isn't set"
+            raise error.ProgrammingError(msg)
         return self._repo[self._other]
 
     def active(self):