##// END OF EJS Templates
bundle2: introduce a ``params`` attribute to BundleValueError...
Pierre-Yves David -
r21621:b6eb56a9 default
parent child Browse files
Show More
@@ -100,13 +100,15 b' class PushRaced(RuntimeError):'
100 100
101 101 # bundle2 related errors
102 102 class BundleValueError(ValueError):
103 """error raised when bundle2 cannot be processed
104
105 Current main usecase is unsupported part types."""
103 """error raised when bundle2 cannot be processed"""
106 104
107 def __init__(self, parttype):
105 def __init__(self, parttype, params=()):
108 106 self.parttype = parttype
109 super(BundleValueError, self).__init__(parttype)
107 self.params = params
108 msg = parttype
109 if self.params:
110 msg = '%s - %s' % (msg, ', '.join(self.params))
111 super(BundleValueError, self).__init__(msg)
110 112
111 113 class ReadOnlyPartError(RuntimeError):
112 114 """error raised when code tries to alter a part being generated"""
General Comments 0
You need to be logged in to leave comments. Login now