equal
deleted
inserted
replaced
179 def __str__(self): |
179 def __str__(self): |
180 # the output would be unreadable if the message was translated, |
180 # the output would be unreadable if the message was translated, |
181 # but do not replace it with encoding.strfromlocal(), which |
181 # but do not replace it with encoding.strfromlocal(), which |
182 # may raise another exception. |
182 # may raise another exception. |
183 return pycompat.sysstr(self.__bytes__()) |
183 return pycompat.sysstr(self.__bytes__()) |
|
184 |
|
185 def format(self): |
|
186 from .i18n import _ |
|
187 |
|
188 message = _(b"abort: %s\n") % self.message |
|
189 if self.hint: |
|
190 message += _(b"(%s)\n") % self.hint |
|
191 return message |
184 |
192 |
185 |
193 |
186 class InputError(Abort): |
194 class InputError(Abort): |
187 """Indicates that the user made an error in their input. |
195 """Indicates that the user made an error in their input. |
188 |
196 |