comparison mercurial/error.py @ 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 9c023179e8d0
children 19df975eb555
comparison
equal deleted inserted replaced
32439:284b18303f61 32440:c8e10565a113
174 class PushRaced(RuntimeError): 174 class PushRaced(RuntimeError):
175 """An exception raised during unbundling that indicate a push race""" 175 """An exception raised during unbundling that indicate a push race"""
176 176
177 class ProgrammingError(Hint, RuntimeError): 177 class ProgrammingError(Hint, RuntimeError):
178 """Raised if a mercurial (core or extension) developer made a mistake""" 178 """Raised if a mercurial (core or extension) developer made a mistake"""
179
180 class WdirUnsupported(Exception):
181 """An exception which is raised when 'wdir()' is not supported"""
179 182
180 # bundle2 related errors 183 # bundle2 related errors
181 class BundleValueError(ValueError): 184 class BundleValueError(ValueError):
182 """error raised when bundle2 cannot be processed""" 185 """error raised when bundle2 cannot be processed"""
183 186