1use crate::futures::futures;
2use crate::graphics;
34/// An error that occurred while running an application.
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7/// The futures executor could not be created.
8#[error("the futures executor could not be created")]
9ExecutorCreationFailed(futures::io::Error),
1011/// The application window could not be created.
12#[error("the application window could not be created")]
13WindowCreationFailed(winit::error::OsError),
1415/// The application graphics context could not be created.
16#[error("the application graphics context could not be created")]
17GraphicsCreationFailed(graphics::Error),
18}
1920impl From<graphics::Error> for Error {
21fn from(error: iced_graphics::Error) -> Error {
22 Error::GraphicsCreationFailed(error)
23 }
24}