Provide a useful error message when we fail to create the GLFW window

This commit is contained in:
Keegan McAllister 2013-09-05 12:56:18 -07:00
parent ebe1c1353c
commit 2babc8dde1

View file

@ -59,7 +59,8 @@ impl WindowMethods<Application> for Window {
/// Creates a new window. /// Creates a new window.
fn new(_: &Application) -> @mut Window { fn new(_: &Application) -> @mut Window {
// Create the GLFW window. // Create the GLFW window.
let glfw_window = glfw::Window::create(800, 600, "Servo", glfw::Windowed).unwrap(); let glfw_window = glfw::Window::create(800, 600, "Servo", glfw::Windowed)
.expect("Failed to create GLFW window");
glfw_window.make_context_current(); glfw_window.make_context_current();
// Create our window object. // Create our window object.