Mercurial > public > mercurial-scm > hg
diff mercurial/hg.py @ 2555:d6605381c6df
hg.py: move exception handling code to try to avoid hiding errors
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sun, 02 Jul 2006 22:39:39 -0300 |
parents | e1831f06eef1 |
children | 0875cda033fd |
line wrap: on
line diff
--- a/mercurial/hg.py Mon Jul 03 14:30:38 2006 -0700 +++ b/mercurial/hg.py Sun Jul 02 22:39:39 2006 -0300 @@ -63,11 +63,11 @@ if scheme: c = scheme.find(':') scheme = c >= 0 and scheme[:c] - try: - ctor = schemes.get(scheme) or schemes['file'] - if create: + ctor = schemes.get(scheme) or schemes['file'] + if create: + try: return ctor(ui, path, create) - return ctor(ui, path) - except TypeError: - raise util.Abort(_('cannot create new repository over "%s" protocol') % - scheme) + except TypeError: + raise util.Abort(_('cannot create new repository over "%s" protocol') % + scheme) + return ctor(ui, path)