diff mercurial/error.py @ 26896:5e46123e6c35

error: add structured exception for EOF at prompt We'll catch this exception for promptchoice queries to provide better error handling.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 10 Nov 2015 00:46:45 -0800
parents 338af85109dd
children 039a53c87370
line wrap: on
line diff
--- a/mercurial/error.py	Mon Nov 09 22:37:32 2015 -0800
+++ b/mercurial/error.py	Tue Nov 10 00:46:45 2015 -0800
@@ -72,6 +72,12 @@
 class UpdateAbort(Abort):
     """Raised when an update is aborted for destination issue"""
 
+class ResponseExpected(Abort):
+    """Raised when an EOF is received for a prompt"""
+    def __init__(self):
+        from .i18n import _
+        Abort.__init__(self, _('response expected'))
+
 class OutOfBandError(Exception):
     """Exception raised when a remote repo reports failure"""