pub enum GameError {
IOError(Error),
ShaderProgramError(String),
GamepadError(String),
LyonError(String),
MixerNotCreated,
SoundError,
UnknownError(String),
ResourceNotFound(String, Vec<(PathBuf, GameError)>),
FilesystemError(String),
ResourceLoadError(String),
RenderError(String),
CustomError(String),
}Expand description
An enum containing all kinds of game framework errors.
Variants§
IOError(Error)
Something went wrong trying to read from a file
ShaderProgramError(String)
Something went wrong compiling shaders
GamepadError(String)
Something went wrong with the gilrs gamepad-input library.
LyonError(String)
Something went wrong with the lyon shape-tesselation library
MixerNotCreated
SoundMixer in the context should be created explicitly from some of the interaction callbacks Thats the only way to get audio to works on web :(
SoundError
UnknownError(String)
ResourceNotFound(String, Vec<(PathBuf, GameError)>)
Unable to find a resource; the Vec is the paths it searched for and associated errors
FilesystemError(String)
An error in the filesystem layout
ResourceLoadError(String)
An error trying to load a resource, such as getting an invalid image file.
RenderError(String)
Something went wrong in the renderer
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.
Trait Implementations§
Source§impl Error for GameError
impl Error for GameError
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<GeometryBuilderError> for GameError
Available on crate feature mesh only.
impl From<GeometryBuilderError> for GameError
mesh only.Source§fn from(s: GeometryBuilderError) -> GameError
fn from(s: GeometryBuilderError) -> GameError
Source§impl From<ShaderError> for GameError
impl From<ShaderError> for GameError
Source§fn from(e: ShaderError) -> GameError
fn from(e: ShaderError) -> GameError
Source§impl From<TessellationError> for GameError
Available on crate feature mesh only.
impl From<TessellationError> for GameError
mesh only.Source§fn from(s: TessellationError) -> GameError
fn from(s: TessellationError) -> GameError
Auto Trait Implementations§
impl Freeze for GameError
impl !RefUnwindSafe for GameError
impl Send for GameError
impl Sync for GameError
impl Unpin for GameError
impl !UnwindSafe for GameError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more