pub enum GameError {
Show 22 variants
GraphicsInitializationError,
FilesystemError(String),
ConfigError(String),
EventLoopError(String),
ResourceLoadError(String),
ResourceNotFound(String, Vec<(PathBuf, GameError)>),
RenderError(String),
RequestDeviceError(RequestDeviceError),
AudioError(String),
WindowError(String),
WindowCreationError(Arc<OsError>),
IOError(Arc<Error>),
FontError(InvalidFont),
ShaderEncodingError(FromUtf8Error),
VideoError(String),
GamepadError(String),
LyonError(String),
GlyphBrushError(BrushError),
FontSelectError(String),
BufferAsyncError(BufferAsyncError),
LockError,
CustomError(String),
}
Expand description
An enum containing all kinds of game framework errors.
Variants§
GraphicsInitializationError
An error when intializing the graphics system.
FilesystemError(String)
An error in the filesystem layout
ConfigError(String)
An error in the config file
EventLoopError(String)
Happens when an winit::event_loop::EventLoopProxy
attempts to
wake up an winit::event_loop::EventLoop
that no longer exists.
ResourceLoadError(String)
An error trying to load a resource, such as getting an invalid image file.
ResourceNotFound(String, Vec<(PathBuf, GameError)>)
Unable to find a resource; the Vec
is the paths it searched for and associated errors
RenderError(String)
Something went wrong in the renderer
RequestDeviceError(RequestDeviceError)
Something went wrong when requesting a logical device from the graphics API.
AudioError(String)
Something went wrong in the audio playback
WindowError(String)
Something went wrong trying to set or get window properties.
WindowCreationError(Arc<OsError>)
Something went wrong trying to create a window
IOError(Arc<Error>)
Something went wrong trying to read from a file
FontError(InvalidFont)
Something went wrong trying to load a font
ShaderEncodingError(FromUtf8Error)
Shader encoding error (not valid utf-8)
VideoError(String)
Something went wrong applying video settings.
GamepadError(String)
Something went wrong with the gilrs
gamepad-input library.
LyonError(String)
Something went wrong with the lyon
shape-tesselation library.
GlyphBrushError(BrushError)
Something went wrong when drawing text.
FontSelectError(String)
Attempted to draw text with a non-existent font name.
BufferAsyncError(BufferAsyncError)
Something went wrong when asynchronously mapping a GPU buffer.
LockError
Deadlock when trying to lock a mutex.
CustomError(String)
A custom error type for use by users of ggez. This lets you handle custom errors that may happen during your game (such as, trying to load a malformed file for a level) using the same mechanism you handle ggez’s other errors.
Please include an informative message with the error.