Browse Source

Abort instead of exit from MAGNUM_ASSERT_*_SUPPORTED() macros.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
c38407c0bb
  1. 12
      src/Context.h

12
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<extension>()) { \
Corrade::Utility::Error() << "Magnum: required extension" << extension::string() << "is not supported"; \
std::exit(-3); \
std::abort(); \
} \
} while(0)
#endif

Loading…
Cancel
Save