comparison mercurial/error.py @ 23010:73f394f4affc

bundle2: add an UnsupportedPartError We need the BundleValueError for format errors not related to part support. So we add a specific class for part-support errors.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 15 Oct 2014 03:22:47 -0700
parents 244478687edd
children f00813325c5a
comparison
equal deleted inserted replaced
23009:90f86ad3d4ff 23010:73f394f4affc
100 100
101 # bundle2 related errors 101 # bundle2 related errors
102 class BundleValueError(ValueError): 102 class BundleValueError(ValueError):
103 """error raised when bundle2 cannot be processed""" 103 """error raised when bundle2 cannot be processed"""
104 104
105 class UnsupportedPartError(BundleValueError):
105 def __init__(self, parttype=None, params=()): 106 def __init__(self, parttype=None, params=()):
106 self.parttype = parttype 107 self.parttype = parttype
107 self.params = params 108 self.params = params
108 if self.parttype is None: 109 if self.parttype is None:
109 msg = 'Stream Parameter' 110 msg = 'Stream Parameter'