summaryrefslogtreecommitdiffstats
path: root/graphics/src/error.rs
diff options
context:
space:
mode:
authorLibravatar Richard <richardsoncusto@gmail.com>2022-01-27 04:00:53 -0300
committerLibravatar Richard <richardsoncusto@gmail.com>2022-04-20 19:57:59 -0300
commit1e62fdf069db5687be510e1cc375260bbff318a7 (patch)
treeb55e0db435c12bc31bda3bd7bcfe1908bcef32e0 /graphics/src/error.rs
parenta33e320521fa0f08704bcea541ca337d0f45449e (diff)
downloadiced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.gz
iced-1e62fdf069db5687be510e1cc375260bbff318a7.tar.bz2
iced-1e62fdf069db5687be510e1cc375260bbff318a7.zip
Introduce `Error::ContextCreationFailed`
Diffstat (limited to 'graphics/src/error.rs')
-rw-r--r--graphics/src/error.rs18
1 files changed, 15 insertions, 3 deletions
diff --git a/graphics/src/error.rs b/graphics/src/error.rs
index c86e326a..77758f54 100644
--- a/graphics/src/error.rs
+++ b/graphics/src/error.rs
@@ -1,7 +1,19 @@
-/// A graphical error that occurred while running an application.
+/// An error that occurred while creating an application's graphical context.
#[derive(Debug, thiserror::Error)]
pub enum Error {
- /// A suitable graphics adapter or device could not be found
+ /// The requested backend version is not supported.
+ #[error("the requested backend version is not supported")]
+ VersionNotSupported,
+
+ /// Failed to find any pixel format that matches the criteria.
+ #[error("failed to find any pixel format that matches the criteria")]
+ NoAvailablePixelFormat,
+
+ /// A suitable graphics adapter or device could not be found.
#[error("a suitable graphics adapter or device could not be found")]
- AdapterNotFound,
+ GraphicsAdapterNotFound,
+
+ /// An error occured in the context's internal backend
+ #[error("an error occured in the context's internal backend")]
+ BackendError(String),
}