comparison 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
comparison
equal deleted inserted replaced
26895:fc41f9ffd4a4 26896:5e46123e6c35
69 class ConfigError(Abort): 69 class ConfigError(Abort):
70 """Exception raised when parsing config files""" 70 """Exception raised when parsing config files"""
71 71
72 class UpdateAbort(Abort): 72 class UpdateAbort(Abort):
73 """Raised when an update is aborted for destination issue""" 73 """Raised when an update is aborted for destination issue"""
74
75 class ResponseExpected(Abort):
76 """Raised when an EOF is received for a prompt"""
77 def __init__(self):
78 from .i18n import _
79 Abort.__init__(self, _('response expected'))
74 80
75 class OutOfBandError(Exception): 81 class OutOfBandError(Exception):
76 """Exception raised when a remote repo reports failure""" 82 """Exception raised when a remote repo reports failure"""
77 83
78 def __init__(self, *args, **kw): 84 def __init__(self, *args, **kw):