From 4cd4ee2eb50b824a9a6fc110b60ff7ad5dad0859 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 11 Jul 2020 14:19:18 -0700 Subject: [PATCH] egl: revise how we report egl init errors --- window/src/egl.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/window/src/egl.rs b/window/src/egl.rs index 0b5a1e1c4..46c96379e 100644 --- a/window/src/egl.rs +++ b/window/src/egl.rs @@ -334,6 +334,9 @@ impl GlState { #[cfg(not(target_os = "windows"))] "libEGL.so", ]; + + let mut errors = vec![]; + for path in &paths { if let Ok(lib) = libloading::Library::new(path) { match EglWrapper::load_egl(lib) { @@ -343,16 +346,16 @@ impl GlState { return Ok(result); } Err(e) => { - log::error!("with_egl_lib failed: {}", e); + errors.push(format!("with_egl_lib({}) failed: {}", path, e)); } }, Err(e) => { - log::error!("load_egl failed: {}", e); + errors.push(format!("load_egl {} failed: {}", path, e)); } } } } - bail!("EGL library not found") + bail!("with_egl_lib failed: {}", errors.join(", ")) } #[cfg(all(unix, feature = "wayland", not(target_os = "macos")))]