diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 8954ec6e3aa60..1e3bd72bd91a3 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -847,7 +847,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback */ mEglContext = mEGLContextFactory.createContext(mEgl, mEglDisplay, mEglConfig); if (mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT) { - throw new RuntimeException("createContext failed"); + throwEglException("createContext"); } mEglSurface = null;