[project @ 2005-01-26 12:23:33 by simonmar]
authorsimonmar <unknown>
Wed, 26 Jan 2005 12:23:33 +0000 (12:23 +0000)
committersimonmar <unknown>
Wed, 26 Jan 2005 12:23:33 +0000 (12:23 +0000)
I think InvalidArgument is more useful than OtherError for EBADF.

Foreign/C/Error.hs

index 74d4e1a..ac26141 100644 (file)
@@ -472,7 +472,7 @@ errnoToIOError loc errno maybeHdl maybeName = unsafePerformIO $ do
         | errno == eAFNOSUPPORT    = UnsupportedOperation
         | errno == eAGAIN          = ResourceExhausted
         | errno == eALREADY        = AlreadyExists
-        | errno == eBADF           = OtherError
+        | errno == eBADF           = InvalidArgument
         | errno == eBADMSG         = InappropriateType
         | errno == eBADRPC         = OtherError
         | errno == eBUSY           = ResourceBusy