LIB: improve documentation

This commit is contained in:
hasufell 2016-04-08 02:43:39 +02:00
parent 844abcdc86
commit 7f086911e1
1 changed files with 4 additions and 2 deletions

View File

@ -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)