Maintainer | John Goerzen, |
---|
Maintainer : jgoerzen@complete.org Stability : provisional Portability: portable
Handling LDAP Exceptions
Written by John Goerzen, jgoerzen@complete.org
- data LDAPException = LDAPException {
- code :: LDAPReturnCode
- description :: String
- caller :: String
- catchLDAP :: IO a -> (LDAPException -> IO a) -> IO a
- handleLDAP :: (LDAPException -> IO a) -> IO a -> IO a
- failLDAP :: IO a -> IO a
Types
data LDAPException Source
The basic type of LDAP exceptions. These are raised when an operation does not indicate success.
LDAPException | |
|
General Catching
catchLDAP :: IO a -> (LDAPException -> IO a) -> IO aSource
Execute the given IO action.
If it raises a LDAPException
, then execute the supplied handler and return
its return value. Otherwise, process as normal.
handleLDAP :: (LDAPException -> IO a) -> IO a -> IO aSource
Like catchLDAP
, with the order of arguments reversed.