Enum nze_game_sdl::Error
source · pub enum Error {
Sdl2InitFailure(String),
Sdl2ChangeState(String),
LoadFile(String),
Draw(String),
TextRender(String),
MissingResource(String),
AudioPlay(String),
}
Expand description
Used by the library for reporting errors, so that the calling program can respond appropriately
Variants§
Sdl2InitFailure(String)
Some part of sdl failed to initilaize, this error is usually unrecoverable and indicates an issue with the environment or with missing library files
Sdl2ChangeState(String)
Error from changing the state of sdl
LoadFile(String)
This error indicates a requested resource failed to load, ie a texture or a font from ‘TextureManager::load’ or ‘FontManager::load’
Draw(String)
Occurs if there was a problem drawing to the sdl2 ‘Canvas’
TextRender(String)
Occurs if there was a problem creating a texture from a font and a string
MissingResource(String)
Occurs if a resource that has been freed is used
AudioPlay(String)
Occurs if an audio resource fails to play