##// END OF EJS Templates
flagutil: make the error class used by the mixin configurable...
marmoute -
r43142:7907008a default
parent child Browse files
Show More
@@ -87,6 +87,8 b' class flagprocessorsmixin(object):'
87 87 See the documentation of the ``_processflags`` method for details.
88 88 """
89 89
90 _flagserrorclass = error.RevlogError
91
90 92 def _processflags(self, text, flags, operation, raw=False):
91 93 """Inspect revision data flags and applies transforms defined by
92 94 registered flag processors.
@@ -117,8 +119,8 b' class flagprocessorsmixin(object):'
117 119 operation)
118 120 # Check all flags are known.
119 121 if flags & ~REVIDX_KNOWN_FLAGS:
120 raise error.RevlogError(_("incompatible revision flag '%#x'") %
121 (flags & ~REVIDX_KNOWN_FLAGS))
122 raise self._flagserrorclass(_("incompatible revision flag '%#x'") %
123 (flags & ~REVIDX_KNOWN_FLAGS))
122 124 validatehash = True
123 125 # Depending on the operation (read or write), the order might be
124 126 # reversed due to non-commutative transforms.
@@ -134,7 +136,7 b' class flagprocessorsmixin(object):'
134 136
135 137 if flag not in self._flagprocessors:
136 138 message = _("missing processor for flag '%#x'") % (flag)
137 raise error.RevlogError(message)
139 raise self._flagserrorclass(message)
138 140
139 141 processor = self._flagprocessors[flag]
140 142 if processor is not None:
General Comments 0
You need to be logged in to leave comments. Login now