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.Exception

Synopsis

- data SDLException
  - = SDLCallFailed {
    - sdlExceptionCaller :: !Text
    - sdlFunction :: !Text
    - sdlExceptionError :: !Text
    }
  - | SDLUnexpectedArgument {
    - sdlExceptionCaller :: !Text
    - sdlFunction :: !Text
    - sdlUnknownValue :: !String
    }
  - | SDLUnknownHintValue {
    - sdlHint :: !String
    - sdlUnknownValue :: !String
    }

# Documentation

data SDLException Source #

Error details about a failure to call an SDL routine. Almost all functions in this library have the ability to produce exceptions of this type. Inspection should help you learn more about what has gone wrong.

Constructors

SDLCallFailed | A call to a low-level SDL C function failed unexpectedly.

Fields

- sdlExceptionCaller :: !Text

  The Haskell routine that was trying to call a C function

- sdlFunction :: !Text

  The C function that was called and produced an error

- sdlExceptionError :: !Text

  SDL's understanding of what has gone wrong

SDLUnexpectedArgument | An SDL C function was called with an unexpected argument.

Fields

- sdlExceptionCaller :: !Text

  The Haskell routine that was trying to call a C function

- sdlFunction :: !Text

  The C function that was called and produced an error

- sdlUnknownValue :: !String

  The argument that SDL failed to understand

SDLUnknownHintValue | A hint was attempted to be set, but SDL does not know about this hint.

Fields

- sdlHint :: !String

  The hint that could not be set

- sdlUnknownValue :: !String

  The argument that SDL failed to understand

#### Instances

Instances details

Data SDLException Source # |

Instance details

Defined in SDL.Exception

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SDLException -> c SDLException Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SDLException Source #

toConstr :: SDLException -> Constr Source #

dataTypeOf :: SDLException -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SDLException) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SDLException) Source #

gmapT :: (forall b. Data b => b -> b) -> SDLException -> SDLException Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SDLException -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SDLException -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> SDLException -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SDLException -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SDLException -> m SDLException Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SDLException -> m SDLException Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SDLException -> m SDLException Source #

Exception SDLException Source # |
Instance details Defined in SDL.Exception Methods toException :: SDLException -> SomeException Source # fromException :: SomeException -> Maybe SDLException Source # displayException :: SDLException -> String Source #
Generic SDLException Source # |
Instance details Defined in SDL.Exception Associated Types type Rep SDLException :: Type -> Type Source # Methods from :: SDLException -> Rep SDLException x Source # to :: Rep SDLException x -> SDLException Source #
Read SDLException Source # |
Instance details Defined in SDL.Exception Methods readsPrec :: Int -> ReadS SDLException Source # readList :: ReadS [SDLException] Source # readPrec :: ReadPrec SDLException Source # readListPrec :: ReadPrec [SDLException] Source #
Show SDLException Source # |
Instance details Defined in SDL.Exception Methods showsPrec :: Int -> SDLException -> ShowS Source # show :: SDLException -> String Source # showList :: [SDLException] -> ShowS Source #
Eq SDLException Source # |
Instance details Defined in SDL.Exception Methods (==) :: SDLException -> SDLException -> Bool Source # (/=) :: SDLException -> SDLException -> Bool Source #
Ord SDLException Source # |

Instance details

Defined in SDL.Exception

Methods

compare :: SDLException -> SDLException -> Ordering Source #

(<) :: SDLException -> SDLException -> Bool Source #

(<=) :: SDLException -> SDLException -> Bool Source #

(>) :: SDLException -> SDLException -> Bool Source #

(>=) :: SDLException -> SDLException -> Bool Source #

max :: SDLException -> SDLException -> SDLException Source #

min :: SDLException -> SDLException -> SDLException Source #

type Rep SDLException Source # |

Instance details

Defined in SDL.Exception

type Rep SDLException = D1 ('MetaData "SDLException" "SDL.Exception" "sdl2-2.5.5.0-4ZUjajaf0wAQFo9pnxskX" 'False) (C1 ('MetaCons "SDLCallFailed" 'PrefixI 'True) (S1 ('MetaSel ('Just "sdlExceptionCaller") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sdlFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sdlExceptionError") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "SDLUnexpectedArgument" 'PrefixI 'True) (S1 ('MetaSel ('Just "sdlExceptionCaller") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "sdlFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sdlUnknownValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))) :+: C1 ('MetaCons "SDLUnknownHintValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "sdlHint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "sdlUnknownValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))