##// END OF EJS Templates
[issue21] cannot debug extension...
Benoit Boissinot -
r1424:918cb47d default
parent child Browse files
Show More
@@ -2068,11 +2068,16 b' def dispatch(args):'
2068 2068 u = ui.ui()
2069 2069 external = []
2070 2070 for x in u.extensions():
2071 def on_exception(Exception, inst):
2072 u.warn(_("*** failed to import extension %s\n") % x[1])
2073 u.warn("%s\n" % inst)
2074 if "--traceback" in sys.argv[1:]:
2075 traceback.print_exc()
2071 2076 if x[1]:
2072 2077 try:
2073 2078 mod = imp.load_source(x[0], x[1])
2074 except:
2075 u.warn(_("*** failed to import extension %s\n") % x[1])
2079 except Exception, inst:
2080 on_exception(Exception, inst)
2076 2081 continue
2077 2082 else:
2078 2083 def importh(name):
@@ -2083,8 +2088,8 b' def dispatch(args):'
2083 2088 return mod
2084 2089 try:
2085 2090 mod = importh(x[0])
2086 except:
2087 u.warn(_("failed to import extension %s\n") % x[0])
2091 except Exception, inst:
2092 on_exception(Exception, inst)
2088 2093 continue
2089 2094
2090 2095 external.append(mod)
General Comments 0
You need to be logged in to leave comments. Login now