changeset 11122:2114e44b08f6

clean up remaining generic exceptions
author Matt Mackall <mpm@selenic.com>
date Fri, 07 May 2010 16:59:00 -0500
parents d061ef1d781c
children 06586648eeec 8c8a713f6dac
files hgext/convert/cvsps.py mercurial/pure/mpatch.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvsps.py	Fri May 07 16:51:45 2010 -0400
+++ b/hgext/convert/cvsps.py	Fri May 07 16:59:00 2010 -0500
@@ -239,12 +239,12 @@
                 continue
             match = re_01.match(line)
             if match:
-                raise Exception(match.group(1))
+                raise logerror(match.group(1))
             match = re_02.match(line)
             if match:
-                raise Exception(match.group(2))
+                raise logerror(match.group(2))
             if re_03.match(line):
-                raise Exception(line)
+                raise logerror(line)
 
         elif state == 1:
             # expect 'Working file' (only when using log instead of rlog)
--- a/mercurial/pure/mpatch.py	Fri May 07 16:51:45 2010 -0400
+++ b/mercurial/pure/mpatch.py	Fri May 07 16:59:00 2010 -0500
@@ -112,7 +112,7 @@
         outlen += length
 
     if bin != binend:
-        raise Exception("patch cannot be decoded")
+        raise ValueError("patch cannot be decoded")
 
     outlen += orig - last
     return outlen