sdl2-2.5.5.0: Both high- and low-level bindings to the SDL library (version 2.0.6+).

Safe Haskell | Safe-Inferred
Language | Haskell2010

SDL.Raw.Error

Contents

- Error Handling
- Manual Error Handling

Synopsis

- newtype SDLError = SDLError CString
- throwError :: (MonadThrow m, MonadIO m) => m ()
- clearError :: MonadIO m => m ()
- getError :: MonadIO m => m CString
- setError :: MonadIO m => CString -> m CInt

# Error Handling

newtype SDLError Source #

Note: the `CString` is only valid until the next SDL function call. If you need to preserve the error message, make a copy of it.

Constructors

SDLError CString |

#### Instances

Instances details

Exception SDLError Source # |
Instance details Defined in SDL.Raw.Error Methods toException :: SDLError -> SomeException Source # fromException :: SomeException -> Maybe SDLError Source # displayException :: SDLError -> String Source #
Show SDLError Source # |
Instance details Defined in SDL.Raw.Error Methods showsPrec :: Int -> SDLError -> ShowS Source # show :: SDLError -> String Source # showList :: [SDLError] -> ShowS Source #
Eq SDLError Source # |
Instance details Defined in SDL.Raw.Error Methods (==) :: SDLError -> SDLError -> Bool Source # (/=) :: SDLError -> SDLError -> Bool Source #

throwError :: (MonadThrow m, MonadIO m) => m () Source #

# Manual Error Handling

clearError :: MonadIO m => m () Source #

getError :: MonadIO m => m CString Source #

setError :: MonadIO m => CString -> m CInt Source #