summaryrefslogtreecommitdiffstats
path: root/graphics/src/error.rs
diff options
context:
space:
mode:
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),
}