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