mercurial/error.py
changeset 21627 3e8bcc90f07c
parent 21621 b6eb56a9335d
child 21747 fecead61d222
equal deleted inserted replaced
21626:985d139c8e8f 21627:3e8bcc90f07c
   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     def __init__(self, parttype, params=()):
   105     def __init__(self, parttype=None, params=()):
   106         self.parttype = parttype
   106         self.parttype = parttype
   107         self.params = params
   107         self.params = params
   108         msg = parttype
   108         if self.parttype is None:
       
   109             msg = 'Stream Parameter'
       
   110         else:
       
   111             msg = parttype
   109         if self.params:
   112         if self.params:
   110             msg = '%s - %s' % (msg, ', '.join(self.params))
   113             msg = '%s - %s' % (msg, ', '.join(self.params))
   111         super(BundleValueError, self).__init__(msg)
   114         super(BundleValueError, self).__init__(msg)
   112 
   115 
   113 class ReadOnlyPartError(RuntimeError):
   116 class ReadOnlyPartError(RuntimeError):