windows: provide filename in IOError exceptions
authorSteve Borho <steve@borho.org>
Mon, 14 Sep 2009 19:53:43 -0500
changeset 9448 bc6b0fef9495
parent 9442 080227f584a1
child 9449 61e30f257c15
child 9450 e78967d3dd6f
child 9452 812b812ce8cf
windows: provide filename in IOError exceptions This brings the Windows posixfile errors in line with the errors on other platforms.
mercurial/windows.py
--- a/mercurial/windows.py	Sun Sep 13 17:23:47 2009 +0200
+++ b/mercurial/windows.py	Mon Sep 14 19:53:43 2009 -0500
@@ -17,7 +17,7 @@
     try:
         return osutil.posixfile(name, mode, buffering)
     except WindowsError, err:
-        raise IOError(err.errno, err.strerror)
+        raise IOError(err.errno, '%s: %s' % (name, err.strerror))
 posixfile.__doc__ = osutil.posixfile.__doc__
 
 class winstdout(object):