From 6f5d556c02f9a30f5bff3a6a2bb5cfe7cc98a82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 21 Feb 2014 18:28:38 +0100 Subject: [PATCH] Unique exit code for each failure in Context::Context(). Make it less annoying to debug things on platforms which send all standard output to /dev/hell without any easy way to override that. Yes, I'm looking at you, Android. --- src/Magnum/Context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index ba41a0946..ca70e810a 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -283,7 +283,7 @@ Context::Context() { everything possible. */ if(ogl_LoadFunctions() == ogl_LOAD_FAILED) { Error() << "ExtensionWrangler: cannot initialize glLoadGen"; - std::exit(1); + std::exit(64); } #endif @@ -327,7 +327,7 @@ Context::Context() { #endif } else { Error() << "Context: unsupported version string:" << version; - std::exit(1); + std::exit(65); } } #endif @@ -356,7 +356,7 @@ Context::Context() { #else Error() << "Context: unsupported OpenGL ES version" << Magnum::version(_version); #endif - std::exit(1); + std::exit(66); } /* Context flags are supported since GL 3.0 */