From 5e3563d7dab16384bcc381e24b741fa651f2f3cd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 5 Apr 2013 02:23:11 +0200 Subject: Bug 713: Handle broken EGL setup - Catch all Exception types, not only JogampRuntimeException at *DrawableFactory* instantiation trial In case EGL is not completly installed, EGLDisplayUtil.eglGetDisplayAndInitialize(..) will throw a GLExeception which was not catched in GLDrawableFactory. The latter only catched JogampRuntimeException caused by ReflectionUtil due to n/a classes, but the actual initialization code is capable to throw others. --- src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/egl') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index ad305ab37..b390621fa 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -72,7 +72,6 @@ import jogamp.opengl.GLDrawableImpl; import jogamp.opengl.GLDynamicLookupHelper; import jogamp.opengl.GLGraphicsConfigurationUtil; -import com.jogamp.common.JogampRuntimeException; import com.jogamp.common.nio.Buffers; import com.jogamp.common.nio.PointerBuffer; import com.jogamp.common.os.Platform; @@ -116,7 +115,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { if(NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true)) { try { ReflectionUtil.createInstance("jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory", EGLDrawableFactory.class.getClassLoader()); - } catch (JogampRuntimeException jre) { /* n/a .. */ } + } catch (Exception jre) { /* n/a .. */ } } // FIXME: Probably need to move EGL from a static model -- cgit v1.2.3