diff mercurial/error.py @ 21620:6eaa71b2a3cc

bundle2: introduce a parttype attribute to BundleValueError We will use the Exception for more that just unknown part type.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 28 May 2014 15:51:19 -0700
parents 7568f5c1c801
children b6eb56a9335d
line wrap: on
line diff
--- a/mercurial/error.py	Tue May 27 10:32:07 2014 -0700
+++ b/mercurial/error.py	Wed May 28 15:51:19 2014 -0700
@@ -103,7 +103,10 @@
     """error raised when bundle2 cannot be processed
 
     Current main usecase is unsupported part types."""
-    pass
+
+    def __init__(self, parttype):
+        self.parttype = parttype
+        super(BundleValueError, self).__init__(parttype)
 
 class ReadOnlyPartError(RuntimeError):
     """error raised when code tries to alter a part being generated"""