Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

run: add a handler for unhandled util.Abort exceptions (closes #274)

This required some special case logic to handle the optional hints that Abort
exceptions can provide.

Changeset c969f014c035

Parent 090d69803260

by Steve Borho

Changes to one file · Browse files at c969f014c035 Showing diff from parent 090d69803260 Diff from another changeset...

 
371
372
373
 
374
375
376
 
422
423
424
 
 
 
 
 
425
426
 
427
428
429
 
371
372
373
374
375
376
377
 
423
424
425
426
427
428
429
430
431
 
432
433
434
435
@@ -371,6 +371,7 @@
  error.RepoLookupError: _('Try refreshing your repository.'),   error.ParseError: _('Error string "%(arg0)s" at %(arg1)s<br>Please '   '<a href="#edit:%(arg1)s">edit</a> your config'), + error.Abort: _('Operation aborted:<br><br>%(arg0)s.'),   }     def __init__(self): @@ -422,8 +423,13 @@
  etype, evalue = self.errors[0][:2]   if len(self.errors) == 1 and etype in self._recoverableexc:   opts['values'] = evalue + errstr = self._recoverableexc[etype] + if etype == error.Abort and evalue.hint: + errstr = u''.join([errstr, u'<br><b>', _('hint:'), + u'</b> %(arg1)s']) + opts['values'] = [str(evalue), evalue.hint]   dlg = ExceptionMsgBox(hglib.tounicode(str(evalue)), - self._recoverableexc[etype], opts, + errstr, opts,   parent=self._mainapp.activeWindow())   elif etype is KeyboardInterrupt:   if qtlib.QuestionMsgBox(_('Keyboard interrupt'),