Mercurial > hg-stable
comparison mercurial/extensions.py @ 6204:f8a86ea7521b
When failing to load an extension, show where Hg tried to load it from.
author | Jesse Glick <jesse.glick@sun.com> |
---|---|
date | Mon, 03 Mar 2008 12:46:57 -0500 |
parents | b12432b1c2c7 |
children | e75aab656f46 |
comparison
equal
deleted
inserted
replaced
6203:3a75fcc96dac | 6204:f8a86ea7521b |
---|---|
76 try: | 76 try: |
77 load(ui, name, path) | 77 load(ui, name, path) |
78 except (util.SignalInterrupt, KeyboardInterrupt): | 78 except (util.SignalInterrupt, KeyboardInterrupt): |
79 raise | 79 raise |
80 except Exception, inst: | 80 except Exception, inst: |
81 ui.warn(_("*** failed to import extension %s: %s\n") % | 81 if path: |
82 (name, inst)) | 82 ui.warn(_("*** failed to import extension %s from %s: %s\n") |
83 % (name, path, inst)) | |
84 else: | |
85 ui.warn(_("*** failed to import extension %s: %s\n") | |
86 % (name, inst)) | |
83 if ui.print_exc(): | 87 if ui.print_exc(): |
84 return 1 | 88 return 1 |
85 | 89 |