[commit: packages/unix] master: Be more explicit in WARNING what will be thrown (757bf44)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 15:51:02 UTC 2015


Repository : ssh://git@git.haskell.org/unix

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/757bf44bb4895fc561a2e5dd2f602168478741ec/unix

>---------------------------------------------------------------

commit 757bf44bb4895fc561a2e5dd2f602168478741ec
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Dec 15 23:33:15 2014 +0100

    Be more explicit in WARNING what will be thrown


>---------------------------------------------------------------

757bf44bb4895fc561a2e5dd2f602168478741ec
 System/Posix/Unistd.hsc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/System/Posix/Unistd.hsc b/System/Posix/Unistd.hsc
index 3b8d2e4..3f2d115 100644
--- a/System/Posix/Unistd.hsc
+++ b/System/Posix/Unistd.hsc
@@ -239,7 +239,7 @@ foreign import capi safe "unistd.h fsync"
   c_fsync :: Fd -> IO CInt
 #else
 {-# WARNING fileSynchronise
-    "operation will throw exception (CPP guard: @#if HAVE_FSYNC@)" #-}
+    "operation will throw 'IOError' \"unsupported operation\" (CPP guard: @#if HAVE_FSYNC@)" #-}
 fileSynchronise _ = ioError (ioeSetLocation unsupportedOperation
                              "fileSynchronise")
 #endif
@@ -260,7 +260,7 @@ foreign import capi safe "unistd.h fdatasync"
   c_fdatasync :: Fd -> IO CInt
 #else
 {-# WARNING fileSynchroniseDataOnly
-    "operation will throw exception (CPP guard: @#if HAVE_FDATASYNC@)" #-}
+    "operation will throw 'IOError' \"unsupported operation\" (CPP guard: @#if HAVE_FDATASYNC@)" #-}
 fileSynchroniseDataOnly _ = ioError (ioeSetLocation unsupportedOperation
                                      "fileSynchroniseDataOnly")
 #endif



More information about the ghc-commits mailing list