From c38407c0bbd4075ccc0121e5e3522824bca04774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 5 Jun 2013 15:10:49 +0200 Subject: [PATCH] Abort instead of exit from MAGNUM_ASSERT_*_SUPPORTED() macros. --- src/Context.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Context.h b/src/Context.h index 644b84ac8..d768897fc 100644 --- a/src/Context.h +++ b/src/Context.h @@ -378,8 +378,8 @@ class MAGNUM_EXPORT Context { Useful for initial checks on availability of required features. By default, if assertion fails, an message is printed to error output and the -application exits with value `-3`. If `CORRADE_NO_ASSERT` is defined, this -macro does nothing. Example usage: +application aborts. If `CORRADE_NO_ASSERT` is defined, this macro does nothing. +Example usage: @code MAGNUM_ASSERT_VERSION_SUPPORTED(Version::GL330); @endcode @@ -395,7 +395,7 @@ MAGNUM_ASSERT_VERSION_SUPPORTED(Version::GL330); do { \ if(!Magnum::Context::current()->isVersionSupported(version)) { \ Corrade::Utility::Error() << "Magnum: required version" << version << "is not supported"; \ - std::exit(-3); \ + std::abort(); \ } \ } while(0) #endif @@ -408,8 +408,8 @@ MAGNUM_ASSERT_VERSION_SUPPORTED(Version::GL330); Useful for initial checks on availability of required features. By default, if assertion fails, an message is printed to error output and the -application exits with value `-3`. If `CORRADE_NO_ASSERT` is defined, this -macro does nothing. Example usage: +application aborts. If `CORRADE_NO_ASSERT` is defined, this macro does nothing. +Example usage: @code MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::geometry_shader4); @endcode @@ -425,7 +425,7 @@ MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::geometry_shader4); do { \ if(!Magnum::Context::current()->isExtensionSupported()) { \ Corrade::Utility::Error() << "Magnum: required extension" << extension::string() << "is not supported"; \ - std::exit(-3); \ + std::abort(); \ } \ } while(0) #endif