am ca00dee2: Merge change I5aa3adcf into eclair

Merge commit 'ca00dee21425882619aef4ecbe3e0d08de0544e5' into eclair-mr2

* commit 'ca00dee21425882619aef4ecbe3e0d08de0544e5':
  Improve the exception message text by including eglGetError().
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index df5f96e..8954ec6 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -880,7 +880,7 @@
                     mEglDisplay, mEglConfig, holder);
 
             if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
-                throw new RuntimeException("createWindowSurface failed");
+                throwEglException("createWindowSurface");
             }
 
             /*
@@ -888,7 +888,7 @@
              * the context is current and bound to a surface.
              */
             if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
-                throw new RuntimeException("eglMakeCurrent failed.");
+                throwEglException("eglMakeCurrent");
             }
 
             GL gl = mEglContext.getGL();
@@ -947,6 +947,10 @@
             }
         }
 
+        private void throwEglException(String function) {
+            throw new RuntimeException(function + " failed: " + mEgl.eglGetError());
+        }
+
         EGL10 mEgl;
         EGLDisplay mEglDisplay;
         EGLSurface mEglSurface;