use super::*;
impl fmt::Display for PlatformError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::WindowNotFound(id) => write!(f, "{ERR_WINDOW_NOT_FOUND}: {id}"),
Self::InitializationFailed(msg) => write!(f, "{ERR_NATIVE_INIT_FAILED}: {msg}"),
Self::SurfaceError(msg) => write!(f, "{ERR_SURFACE_UNAVAILABLE}: {msg}"),
Self::Unsupported(msg) => write!(f, "{msg}"),
}
}
}
impl Error for PlatformError {}