alsa-core-0.5.0.1: Binding to the ALSA Library API (Exceptions).
Safe HaskellSafe
LanguageHaskell98

Sound.ALSA.Exception

Description

ALSA does not distinguish between programming errors and runtime exceptions, which is sad, but we have to cope with it.

Synopsis

Documentation

data T Source #

Constructors

Cons 

Fields

Instances

Instances details
Show T Source # 
Instance details

Defined in Sound.ALSA.Exception

Methods

showsPrec :: Int -> T -> ShowS

show :: T -> String

showList :: [T] -> ShowS

Exception T Source # 
Instance details

Defined in Sound.ALSA.Exception

Methods

toException :: T -> SomeException

fromException :: SomeException -> Maybe T

displayException :: T -> String

checkResult :: Integral a => String -> a -> IO a Source #

checkResult_ :: Integral a => String -> a -> IO () Source #

checkResultMaybe :: String -> (CInt -> a) -> (CInt -> Maybe a) -> CInt -> IO a Source #

throw :: String -> Errno -> IO a Source #

catch :: IO a -> (T -> IO a) -> IO a Source #

catchErrno Source #

Arguments

:: Errno 
-> IO a

Action

-> IO a

Handler

-> IO a 

catchXRun Source #

Arguments

:: IO a

Action

-> IO a

Handler

-> IO a 

showErrno :: Errno -> String Source #

show :: T -> String Source #

rethrow :: IO a -> IO a Source #

Converts any T into an IOError. This produces better a error message than letting an uncaught T propagate to the top.

strerror :: Errno -> IO String Source #

Returns the message for an error code.

snd_strerror :: Errno -> IO CString Source #