use thiserror::Error;
pub type CefCoreResult<T = ()> = Result<T, CefCoreError>;
#[derive(Debug, Error)]
pub enum CefCoreError {
#[error(transparent)]
CreateBrowser(#[from] CreateBrowserError),
#[error(transparent)]
ProfileContext(#[from] ProfileContextError),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)]
pub enum CreateBrowserError {
#[error("CEF did not create the browser")]
NullBrowser,
#[error("no request context was prepared for the profile")]
UnknownProfile,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)]
pub enum ProfileContextError {
#[error("CEF did not create the profile's request context")]
CreationFailed,
#[error("CEF rejected the profile's cache path and fell back to in-memory storage")]
DidNotLoad,
}