From 7f086911e14c815980e4765038ab10b816493882 Mon Sep 17 00:00:00 2001 From: hasufell Date: Fri, 8 Apr 2016 02:43:39 +0200 Subject: [PATCH] LIB: improve documentation --- src/HSFM/FileSystem/Errors.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/HSFM/FileSystem/Errors.hs b/src/HSFM/FileSystem/Errors.hs index 9f48a6d..4caf95f 100644 --- a/src/HSFM/FileSystem/Errors.hs +++ b/src/HSFM/FileSystem/Errors.hs @@ -199,10 +199,12 @@ catchErrno en a1 a2 = else ioError e --- |Execute the given action and retrow IO exceptions that have the given errno. +-- |Execute the given action and retrow IO exceptions as a new Exception +-- that have the given errno. If errno does not match the exception is rethrown +-- as is. rethrowErrnoAs :: Exception e => Errno -- ^ errno to catch - -> e -- ^ rethrow as + -> e -- ^ rethrow as if errno matches -> IO a -- ^ action to try -> IO a rethrowErrnoAs en fmex action = catchErrno en action (throw fmex)