summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-01-04 02:04:15 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-01-04 02:04:15 (GMT)
commite0b76952860808cd60d627882b564453f46c970c (patch)
treed2c7f61794eb5f69d2cbbdbcb0818390ded6b203 /Misc
parentd0d7d87869fb105ec3f849460d2c1b7f9fa851ec (diff)
downloadcpython-e0b76952860808cd60d627882b564453f46c970c.zip
cpython-e0b76952860808cd60d627882b564453f46c970c.tar.gz
cpython-e0b76952860808cd60d627882b564453f46c970c.tar.bz2
Partial port of r59682 from py3k.
On Windows, when import fails to load a dll module, the message says "error code 193" instead of a more informative text. It turns out that FormatMessage needs additional parameters for some error codes. For example: 193 means "%1 is not a valid Win32 application". Since it is impossible to know which parameter to pass, we use FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better than the number.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index bd98e38..fc1c810 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,10 @@ What's New in Python 2.6 alpha 1?
Core and builtins
-----------------
+- Improve some exception messages when Windows fails to load an extension
+ module. Now we get for example '%1 is not a valid Win32 application' instead
+ of 'error code 193'.
+
- Bug #1481296: Fixed long(float('nan'))!=0L.
- Issue #1640: Added math.isinf(x), math.isnan(x) and math.copysign(x, y)