comparison mercurial/verify.py @ 11752:12998fd17fbc stable

verify: report exceptions that don't have a str() method
author Matt Mackall <mpm@selenic.com>
date Thu, 05 Aug 2010 16:17:17 -0500
parents 6ced27d3168a
children eb7b04657dae
comparison
equal deleted inserted replaced
11738:28a450e1f54c 11752:12998fd17fbc
46 46
47 def exc(linkrev, msg, inst, filename=None): 47 def exc(linkrev, msg, inst, filename=None):
48 if isinstance(inst, KeyboardInterrupt): 48 if isinstance(inst, KeyboardInterrupt):
49 ui.warn(_("interrupted")) 49 ui.warn(_("interrupted"))
50 raise 50 raise
51 if not str(inst):
52 inst = repr(inst)
51 err(linkrev, "%s: %s" % (msg, inst), filename) 53 err(linkrev, "%s: %s" % (msg, inst), filename)
52 54
53 def warn(msg): 55 def warn(msg):
54 ui.warn(msg + "\n") 56 ui.warn(msg + "\n")
55 warnings[0] += 1 57 warnings[0] += 1