window_getter/error.rs
1/// Error types for window-getter-rs.
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4 /// The error that occurs when the window environment is not found.
5 /// This can happen on only macOS.
6 #[error("No window environment is running.")]
7 NoWindowEnvironment,
8 /// The error that occurs when you don't have permission to access the window property.
9 /// This can happen on Windows.
10 /// It represents [`E_ACCESSDENIED`][hresult] of [`HRESULT`](windows::core::HRESULT).
11 ///
12 /// [hresult]: <https://learn.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values>
13 #[error("You don't have permission to access the window property: {0}")]
14 PermissionDenied(super::platform_impl::PlatformError),
15 /// platform-specific error that can occur when interacting with the window environment.
16 #[error("A platform-specific error occurred: {0}")]
17 PlatformSpecificError(super::platform_impl::PlatformError),
18}