Replace catch blocks from std::bad_alloc to ellipses.

It seems we weren't catching bad_alloc despite using the correct syntax.
Using ellipses solves the problem, and since we only expect bad_alloc
it does the equivalent result of catching and returning out of memory.

I'm currently not aware of the proper syntax to catch bad_alloc.

BUg=angle:634

Change-Id: Ib3154546d1b72d180cb565c71f35716696863cdd
Reviewed-on: https://chromium-review.googlesource.com/198245
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 8e2c42e..94df078 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -52,7 +52,7 @@
             context->setActiveSampler(texture - GL_TEXTURE0);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -101,7 +101,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -130,7 +130,7 @@
             context->beginQuery(target, id);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -173,7 +173,7 @@
             programObject->bindAttributeLocation(index, name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -225,7 +225,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -257,7 +257,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -281,7 +281,7 @@
             context->bindRenderbuffer(renderbuffer);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -331,7 +331,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -351,7 +351,7 @@
             context->setBlendColor(gl::clamp01(red), gl::clamp01(green), gl::clamp01(blue), gl::clamp01(alpha));
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -401,7 +401,7 @@
             context->setBlendEquation(modeRGB, modeAlpha);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -540,7 +540,7 @@
             context->setBlendFactors(srcRGB, dstRGB, srcAlpha, dstAlpha);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -600,7 +600,7 @@
             buffer->bufferData(data, size, usage);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -658,7 +658,7 @@
             buffer->bufferSubData(data, size, offset);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -684,7 +684,7 @@
             return framebuffer->completeness();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, 0);
     }
@@ -717,7 +717,7 @@
             context->clear(mask);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -737,7 +737,7 @@
             context->setClearColor(red, green, blue, alpha);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -756,7 +756,7 @@
             context->setClearDepth(depth);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -775,7 +775,7 @@
             context->setClearStencil(s);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -795,7 +795,7 @@
             context->setColorMask(red == GL_TRUE, green == GL_TRUE, blue == GL_TRUE, alpha == GL_TRUE);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -828,7 +828,7 @@
             shaderObject->compile();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -892,7 +892,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -957,7 +957,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1017,7 +1017,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1078,7 +1078,7 @@
         }
     }
 
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1097,7 +1097,7 @@
             return context->createProgram();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, 0);
     }
@@ -1125,7 +1125,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, 0);
     }
@@ -1157,7 +1157,7 @@
             return gl::error(GL_INVALID_ENUM);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1184,7 +1184,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1211,7 +1211,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1241,7 +1241,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1277,7 +1277,7 @@
             context->deleteProgram(program);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1304,7 +1304,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1331,7 +1331,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1367,7 +1367,7 @@
             context->deleteShader(shader);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1397,7 +1397,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1431,7 +1431,7 @@
             context->setDepthFunc(func);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1450,7 +1450,7 @@
             context->setDepthMask(flag != GL_FALSE);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1469,7 +1469,7 @@
             context->setDepthRange(zNear, zFar);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1522,7 +1522,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1546,7 +1546,7 @@
             context->setCap(cap, false);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1570,7 +1570,7 @@
             context->setEnableVertexAttribArray(index, false);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1610,7 +1610,7 @@
             context->drawArrays(mode, first, count, 0);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1653,7 +1653,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1707,7 +1707,7 @@
             context->drawElements(mode, count, type, indices, 0);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1764,7 +1764,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1788,7 +1788,7 @@
             context->setCap(cap, true);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1812,7 +1812,7 @@
             context->setEnableVertexAttribArray(index, true);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1836,7 +1836,7 @@
             context->endQuery(target);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1867,7 +1867,7 @@
             fenceObject->finishFence();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1886,7 +1886,7 @@
             context->sync(true);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1905,7 +1905,7 @@
             context->sync(false);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -1960,7 +1960,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2011,7 +2011,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2040,7 +2040,7 @@
             return gl::error(GL_INVALID_ENUM);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2067,7 +2067,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2131,7 +2131,7 @@
             texture->generateMipmaps();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2158,7 +2158,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2185,7 +2185,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2212,7 +2212,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2239,7 +2239,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2266,7 +2266,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2311,7 +2311,7 @@
             programObject->getActiveAttribute(index, bufsize, length, size, type, name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2356,7 +2356,7 @@
             programObject->getActiveUniform(index, bufsize, length, size, type, name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2395,7 +2395,7 @@
             return programObject->getAttachedShaders(maxcount, count, shaders);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2435,7 +2435,7 @@
             return programBinary->getAttributeLocation(name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, -1);
     }
@@ -2472,7 +2472,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2530,7 +2530,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2585,7 +2585,7 @@
             params[0] = fenceObject->getFencei(pname);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2620,7 +2620,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2923,7 +2923,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -2944,7 +2944,7 @@
 
         return GL_NO_ERROR;
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return GL_OUT_OF_MEMORY;
     }
@@ -2979,7 +2979,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3067,7 +3067,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3099,7 +3099,7 @@
             programObject->getInfoLog(bufsize, length, infolog);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3131,7 +3131,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3172,7 +3172,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3226,7 +3226,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3274,7 +3274,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3306,7 +3306,7 @@
             shaderObject->getInfoLog(bufsize, length, infolog);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3351,7 +3351,7 @@
             return gl::error(GL_INVALID_ENUM);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3383,7 +3383,7 @@
             shaderObject->getSource(bufsize, length, source);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3415,7 +3415,7 @@
             shaderObject->getTranslatedSource(bufsize, length, source);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3459,7 +3459,7 @@
             return gl::error(GL_INVALID_ENUM, (GLubyte*)NULL);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, (GLubyte*)NULL);
     }
@@ -3585,7 +3585,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3711,7 +3711,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3757,7 +3757,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3797,7 +3797,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3843,7 +3843,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3883,7 +3883,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -3927,7 +3927,7 @@
             return programBinary->getUniformLocation(name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, -1);
     }
@@ -3971,7 +3971,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4014,7 +4014,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4043,7 +4043,7 @@
             *pointer = const_cast<GLvoid*>(context->getVertexAttribPointer(index));
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4078,7 +4078,7 @@
             return gl::error(GL_INVALID_ENUM);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4102,7 +4102,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4128,7 +4128,7 @@
             return context->getCap(cap);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, false);
     }
@@ -4156,7 +4156,7 @@
             return fenceObject->isFence();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4182,7 +4182,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4208,7 +4208,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4229,7 +4229,7 @@
             return (context->getQuery(id, false, GL_NONE) != NULL) ? GL_TRUE : GL_FALSE;
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4255,7 +4255,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4281,7 +4281,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4307,7 +4307,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -4333,7 +4333,7 @@
             context->setLineWidth(width);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4366,7 +4366,7 @@
             context->linkProgram(program);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4426,7 +4426,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4445,7 +4445,7 @@
             context->setPolygonOffsetParams(factor, units);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4479,7 +4479,7 @@
             context->readPixels(x, y, width, height, format, type, &bufSize, data);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4512,7 +4512,7 @@
             context->readPixels(x, y, width, height, format, type, NULL, pixels);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4526,7 +4526,7 @@
     {
         gl::Shader::releaseCompiler();
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4552,7 +4552,7 @@
             context->setRenderbufferStorage(width, height, internalformat, samples);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4576,7 +4576,7 @@
             context->setSampleCoverageParams(gl::clamp01(value), invert == GL_TRUE);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4607,7 +4607,7 @@
             fenceObject->setFence(condition);    
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4631,7 +4631,7 @@
             context->setScissorParams(x, y, width, height);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4648,7 +4648,7 @@
         // No binary shader formats are supported.
         return gl::error(GL_INVALID_ENUM);
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4687,7 +4687,7 @@
             shaderObject->setSource(count, string, length);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4744,7 +4744,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4786,7 +4786,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4874,7 +4874,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4905,7 +4905,7 @@
             return fenceObject->testFence();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         gl::error(GL_OUT_OF_MEMORY);
     }
@@ -4988,7 +4988,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5039,7 +5039,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5095,7 +5095,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5150,7 +5150,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5216,7 +5216,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5259,7 +5259,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5302,7 +5302,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5347,7 +5347,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5392,7 +5392,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5437,7 +5437,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5482,7 +5482,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5527,7 +5527,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5572,7 +5572,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5616,7 +5616,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5660,7 +5660,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5704,7 +5704,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5742,7 +5742,7 @@
             context->useProgram(program);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5775,7 +5775,7 @@
             programObject->validate();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5800,7 +5800,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5825,7 +5825,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5850,7 +5850,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5875,7 +5875,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5900,7 +5900,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5925,7 +5925,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5950,7 +5950,7 @@
             context->setVertexAttribf(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5974,7 +5974,7 @@
             context->setVertexAttribf(index, values);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -5998,7 +5998,7 @@
             context->setVertexAttribDivisor(index, divisor);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6075,7 +6075,7 @@
                                           normalized == GL_TRUE, false, stride, ptr);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6099,7 +6099,7 @@
             context->setViewportParams(x, y, width, height);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6126,7 +6126,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6152,7 +6152,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6204,7 +6204,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6263,7 +6263,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6317,7 +6317,7 @@
             texture->copySubImage(target, level, xoffset, yoffset, zoffset, x, y, width, height, framebuffer);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6374,7 +6374,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6444,7 +6444,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6476,7 +6476,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6508,7 +6508,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6532,7 +6532,7 @@
             return (context->getQuery(id, false, GL_NONE) != NULL) ? GL_TRUE : GL_FALSE;
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -6568,7 +6568,7 @@
             context->beginQuery(target, id);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6597,7 +6597,7 @@
             context->endQuery(target);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6634,7 +6634,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6680,7 +6680,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6704,7 +6704,7 @@
             return glUnmapBufferOES(target);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -6730,7 +6730,7 @@
             glGetBufferPointervOES(target, pname, params);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6752,7 +6752,7 @@
             glDrawBuffersEXT(n, bufs);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6796,7 +6796,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6840,7 +6840,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6884,7 +6884,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6928,7 +6928,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -6972,7 +6972,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7016,7 +7016,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7049,7 +7049,7 @@
                                      mask, filter);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7080,7 +7080,7 @@
             context->setRenderbufferStorage(width, height, internalformat, samples);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7129,7 +7129,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7154,7 +7154,7 @@
             return glMapBufferRangeEXT(target, offset, length, access);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, reinterpret_cast<GLvoid*>(NULL));
     }
@@ -7180,7 +7180,7 @@
             glFlushMappedBufferRangeEXT(target, offset, length);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7213,7 +7213,7 @@
             context->bindVertexArray(array);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7248,7 +7248,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7280,7 +7280,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7311,7 +7311,7 @@
             return (vao != NULL ? GL_TRUE : GL_FALSE);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -7386,7 +7386,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7435,7 +7435,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7467,7 +7467,7 @@
             transformFeedback->stop();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7545,7 +7545,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7604,7 +7604,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7656,7 +7656,7 @@
             programObject->setTransformFeedbackVaryings(count, varyings, bufferMode);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7700,7 +7700,7 @@
             programObject->getTransformFeedbackVarying(index, bufSize, length, size, type, name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7773,7 +7773,7 @@
                                           stride, pointer);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7821,7 +7821,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7869,7 +7869,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7900,7 +7900,7 @@
             context->setVertexAttribi(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7931,7 +7931,7 @@
             context->setVertexAttribu(index, vals);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7960,7 +7960,7 @@
             context->setVertexAttribi(index, v);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -7989,7 +7989,7 @@
             context->setVertexAttribu(index, v);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8035,7 +8035,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8078,7 +8078,7 @@
             return programBinary->getFragDataLocation(name);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, 0);
     }
@@ -8137,7 +8137,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8171,7 +8171,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8205,7 +8205,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8239,7 +8239,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8282,7 +8282,7 @@
             context->clearBufferiv(buffer, drawbuffer, value);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8319,7 +8319,7 @@
             context->clearBufferuiv(buffer, drawbuffer, value);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8362,7 +8362,7 @@
             context->clearBufferfv(buffer, drawbuffer, value);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8399,7 +8399,7 @@
             context->clearBufferfi(buffer, drawbuffer, depth, stencil);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8433,7 +8433,7 @@
             return reinterpret_cast<const GLubyte*>(context->getExtensionString(index));
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, reinterpret_cast<GLubyte*>(NULL));
     }
@@ -8496,7 +8496,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8554,7 +8554,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8634,7 +8634,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8678,7 +8678,7 @@
             return programBinary->getUniformBlockIndex(uniformBlockName);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, 0);
     }
@@ -8742,7 +8742,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8788,7 +8788,7 @@
             programBinary->getActiveUniformBlockName(uniformBlockIndex, bufSize, length, uniformBlockName);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8840,7 +8840,7 @@
             programObject->bindUniformBlock(uniformBlockIndex, uniformBlockBinding);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8866,7 +8866,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8892,7 +8892,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -8926,7 +8926,7 @@
             return context->createFenceSync(condition);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, reinterpret_cast<GLsync>(NULL));
     }
@@ -8952,7 +8952,7 @@
             return (context->getFenceSync(sync) != NULL);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -8983,7 +8983,7 @@
             context->deleteFenceSync(sync);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9020,7 +9020,7 @@
             return fenceSync->clientWait(flags, timeout);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -9064,7 +9064,7 @@
             fenceSync->serverWait();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9105,7 +9105,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9151,7 +9151,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9221,7 +9221,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9285,7 +9285,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9317,7 +9317,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9349,7 +9349,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9373,7 +9373,7 @@
             return context->isSampler(sampler);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -9409,7 +9409,7 @@
             context->bindSampler(unit, sampler);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9448,7 +9448,7 @@
             context->samplerParameteri(sampler, pname, param);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9492,7 +9492,7 @@
             context->samplerParameterf(sampler, pname, param);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9531,7 +9531,7 @@
             *params = context->getSamplerParameteri(sampler, pname);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9565,7 +9565,7 @@
             *params = context->getSamplerParameterf(sampler, pname);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9594,7 +9594,7 @@
             context->setVertexAttribDivisor(index, divisor);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9641,7 +9641,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9668,7 +9668,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9695,7 +9695,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9719,7 +9719,7 @@
             return ((context->getTransformFeedback(id) != NULL) ? GL_TRUE : GL_FALSE);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -9754,7 +9754,7 @@
             transformFeedback->pause();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9787,7 +9787,7 @@
             transformFeedback->resume();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9813,7 +9813,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9839,7 +9839,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9865,7 +9865,7 @@
             UNIMPLEMENTED();
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9896,7 +9896,7 @@
             context->invalidateFrameBuffer(target, numAttachments, attachments, 0, 0, maxDimension, maxDimension);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9927,7 +9927,7 @@
             context->invalidateFrameBuffer(target, numAttachments, attachments, x, y, width, height);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -9975,7 +9975,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10024,7 +10024,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10078,7 +10078,7 @@
             }
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10111,7 +10111,7 @@
                                      mask, filter);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10129,7 +10129,7 @@
     {
         UNIMPLEMENTED();   // FIXME
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10169,7 +10169,7 @@
             *binaryFormat = GL_PROGRAM_BINARY_ANGLE;
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10202,7 +10202,7 @@
             context->setProgramBinary(program, binary, length);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10260,7 +10260,7 @@
             }
         }
     }
-    catch (std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10301,7 +10301,7 @@
             *params = buffer->mapPointer();
         }
     }
-    catch (std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10342,7 +10342,7 @@
             return buffer->mapRange(0, buffer->size(), GL_MAP_WRITE_BIT);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, reinterpret_cast<GLvoid*>(NULL));
     }
@@ -10379,7 +10379,7 @@
             return GL_TRUE;
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, GL_FALSE);
     }
@@ -10466,7 +10466,7 @@
             return buffer->mapRange(offset, length, access);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, reinterpret_cast<GLvoid*>(NULL));
     }
@@ -10519,7 +10519,7 @@
             // We do not currently support a non-trivial implementation of FlushMappedBufferRange
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY);
     }
@@ -10605,7 +10605,7 @@
             textureObject->bindTexImage(surface);
         }
     }
-    catch(std::bad_alloc&)
+    catch (...)
     {
         return gl::error(GL_OUT_OF_MEMORY, false);
     }