mercurial/error.py
changeset 39559 07b58266bce3
parent 38841 df0873ab5c14
child 39579 921aeb9ac508
--- a/mercurial/error.py	Mon Aug 27 13:30:44 2018 -0700
+++ b/mercurial/error.py	Wed Sep 05 09:06:40 2018 -0700
@@ -308,3 +308,14 @@
 class InMemoryMergeConflictsError(Exception):
     """Exception raised when merge conflicts arose during an in-memory merge."""
     __bytes__ = _tobytes
+
+class WireprotoCommandError(Exception):
+    """Represents an error during execution of a wire protocol command.
+
+    Should only be thrown by wire protocol version 2 commands.
+
+    The error is a formatter string and an optional iterable of arguments.
+    """
+    def __init__(self, message, args=None):
+        self.message = message
+        self.messageargs = args