summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-02-14 15:33:07 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-15 11:22:23 -0600
commitf030da5ccd08fd552b62d0c68eeddb2ac0b2ac1a (patch)
tree922e21c54189c327585e33a60044ab457f5a339c
parent8bf1cf78437a1b6a5e1e7489538eeb600e897ef5 (diff)
downloadqtlocation-mapboxgl-f030da5ccd08fd552b62d0c68eeddb2ac0b2ac1a.tar.gz
[core] Add noexcept(false) in MBGL_CHECK_ERROR
C++11 destructors are noexcept by default, so the prior definition always called std::terminate without allowing anything to catch the exception.
-rw-r--r--include/mbgl/gl/gl.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mbgl/gl/gl.hpp b/include/mbgl/gl/gl.hpp
index 425f78bcba..7521b4c80d 100644
--- a/include/mbgl/gl/gl.hpp
+++ b/include/mbgl/gl/gl.hpp
@@ -41,7 +41,7 @@ struct Error : std::runtime_error {
void checkError(const char *cmd, const char *file, int line);
#ifndef NDEBUG
-#define MBGL_CHECK_ERROR(cmd) ([&]() { struct __MBGL_C_E { ~__MBGL_C_E() { ::mbgl::gl::checkError(#cmd, __FILE__, __LINE__); } } __MBGL_C_E; return cmd; }())
+#define MBGL_CHECK_ERROR(cmd) ([&]() { struct __MBGL_C_E { ~__MBGL_C_E() noexcept(false) { ::mbgl::gl::checkError(#cmd, __FILE__, __LINE__); } } __MBGL_C_E; return cmd; }())
#else
#define MBGL_CHECK_ERROR(cmd) (cmd)
#endif