##// 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 class PushRaced(RuntimeError):
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
105 Current main usecase is unsupported part types."""
106
104
107 def __init__(self, parttype):
105 def __init__(self, parttype, params=()):
108 self.parttype = parttype
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 class ReadOnlyPartError(RuntimeError):
113 class ReadOnlyPartError(RuntimeError):
112 """error raised when code tries to alter a part being generated"""
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