alsa-core-0.5: Binding to the ALSA Library API (Exceptions).

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

Constructors

Cons 

Fields

location :: String
 
description :: String
 
code :: Errno
 

Instances

Show T 
Typeable T 
Exception T 

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

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

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

throw :: String -> Errno -> IO a

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

catchErrno

Arguments

:: Errno 
-> IO a

Action

-> IO a

Handler

-> IO a 

catchXRun

Arguments

:: IO a

Action

-> IO a

Handler

-> IO a 

showErrno :: Errno -> String

show :: T -> String

rethrow :: IO a -> IO a

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

strerror :: Errno -> IO String

Returns the message for an error code.

snd_strerror :: Errno -> IO CString