summaryrefslogtreecommitdiff
path: root/src/GFX
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX')
-rw-r--r--src/GFX/Window.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GFX/Window.cpp b/src/GFX/Window.cpp
index 5c391c8..75e7613 100644
--- a/src/GFX/Window.cpp
+++ b/src/GFX/Window.cpp
@@ -18,7 +18,10 @@ Window::Window(std::string const& title, U32 const width, U32 const height) {
m_window = glfwCreateWindow(TO(I32, width), TO(I32, height), title.c_str(), nullptr, nullptr);
if (m_window == nullptr) {
- throw std::runtime_error("Failed to create window.");
+ Char const* error_description;
+ UInt error_code = glfwGetError(&error_description);
+ std::string error_string = "Failed to create window: " + std::string(error_description) + " (" + std::to_string(error_code) + ")";
+ throw std::runtime_error(error_string);
}
glfwMakeContextCurrent(m_window);