mercurial/hook.py
changeset 43117 8ff1ecfadcd1
parent 43106 d783f945a701
child 43503 313e3a279828
equal deleted inserted replaced
43116:defabf63e969 43117:8ff1ecfadcd1
   115     except Exception as exc:
   115     except Exception as exc:
   116         if isinstance(exc, error.Abort):
   116         if isinstance(exc, error.Abort):
   117             ui.warn(_(b'error: %s hook failed: %s\n') % (hname, exc.args[0]))
   117             ui.warn(_(b'error: %s hook failed: %s\n') % (hname, exc.args[0]))
   118         else:
   118         else:
   119             ui.warn(
   119             ui.warn(
   120                 _(b'error: %s hook raised an exception: ' b'%s\n')
   120                 _(b'error: %s hook raised an exception: %s\n')
   121                 % (hname, stringutil.forcebytestr(exc))
   121                 % (hname, stringutil.forcebytestr(exc))
   122             )
   122             )
   123         if throw:
   123         if throw:
   124             raise
   124             raise
   125         if not ui.tracebackflag:
   125         if not ui.tracebackflag: