iced_winit/
error.rs

1use crate::futures::futures;
2use crate::graphics;
3
4/// 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")]
9    ExecutorCreationFailed(futures::io::Error),
10
11    /// The application window could not be created.
12    #[error("the application window could not be created")]
13    WindowCreationFailed(winit::error::OsError),
14
15    /// The application graphics context could not be created.
16    #[error("the application graphics context could not be created")]
17    GraphicsCreationFailed(graphics::Error),
18}
19
20impl From<graphics::Error> for Error {
21    fn from(error: iced_graphics::Error) -> Error {
22        Error::GraphicsCreationFailed(error)
23    }
24}