aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeegan McAllister <kmcallister@mozilla.com>2013-10-17 18:06:00 -0700
committerKeegan McAllister <kmcallister@mozilla.com>2013-10-17 19:28:43 -0700
commit1e4d3e26613e28f32085ba5932acfc3e91efa4ea (patch)
tree19d409d86e626ea8d04a3db98f147ab743b2376a
parent2babc8dde192a045e9ab8e46a299d0c16876b507 (diff)
downloadservo-1e4d3e26613e28f32085ba5932acfc3e91efa4ea.tar.gz
servo-1e4d3e26613e28f32085ba5932acfc3e91efa4ea.zip
Print GLFW errors
-rw-r--r--src/components/main/platform/common/glfw_windowing.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/main/platform/common/glfw_windowing.rs b/src/components/main/platform/common/glfw_windowing.rs
index 0a7f255665c..60eaa421c6c 100644
--- a/src/components/main/platform/common/glfw_windowing.rs
+++ b/src/components/main/platform/common/glfw_windowing.rs
@@ -27,6 +27,11 @@ pub struct Application;
impl ApplicationMethods for Application {
fn new() -> Application {
+ // Per GLFW docs it's safe to set the error callback before calling
+ // glfwInit(), and this way we notice errors from init too.
+ do glfw::set_error_callback |_error_code, description| {
+ error!("GLFW error: %s", description);
+ };
glfw::init();
Application
}