changeset 32440:c8e10565a113

error: add a new exception named WdirUnsupported This series intents to support wdir() predicate with different operators like ~, ^. Currently the storage class don't support wdir(). This exception is introduced so that it can be raised from places where wdir() is passed and is not supported and we can catch this where we want to support the predicate. Also throwing an error at low level and catching at some higher level is better than using if-else especially for perf.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 19 May 2017 19:10:37 +0530
parents 284b18303f61
children a28c76e1cea9
files mercurial/error.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/error.py	Thu May 18 22:20:59 2017 -0700
+++ b/mercurial/error.py	Fri May 19 19:10:37 2017 +0530
@@ -177,6 +177,9 @@
 class ProgrammingError(Hint, RuntimeError):
     """Raised if a mercurial (core or extension) developer made a mistake"""
 
+class WdirUnsupported(Exception):
+    """An exception which is raised when 'wdir()' is not supported"""
+
 # bundle2 related errors
 class BundleValueError(ValueError):
     """error raised when bundle2 cannot be processed"""