aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-08 08:40:18 +0200
committerSven Gothel <[email protected]>2014-10-08 08:40:18 +0200
commit940b5716ff5e27bffda5e6a6ea4aaa98a7988556 (patch)
treee87e6e6180e074e46ffe7b4a8ddcd3a78b4a9586
parent1fcfd014ca90125ab53ebc4e96e133535a55f095 (diff)
GLException.dumpThrowable(..) -> GlueGen's ExceptionUtils.dumpThrowable(..)
-rw-r--r--src/jogl/classes/javax/media/opengl/GLException.java10
-rw-r--r--src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableHelper.java13
3 files changed, 10 insertions, 16 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLException.java b/src/jogl/classes/javax/media/opengl/GLException.java
index 3f76a6299..acf7cdec0 100644
--- a/src/jogl/classes/javax/media/opengl/GLException.java
+++ b/src/jogl/classes/javax/media/opengl/GLException.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2014 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -74,13 +75,4 @@ public class GLException extends RuntimeException {
public static GLException newGLException(final Throwable t) {
return new GLException("Caught "+t.getClass().getSimpleName()+": "+t.getMessage()+" on thread "+Thread.currentThread().getName(), t);
}
-
- /**
- * Dumps a Throwable in a decorating message including the current thread name, and stack trace.
- * @since 2.2
- */
- public static void dumpThrowable(final String additionalDescr, final Throwable t) {
- System.err.println("Caught "+additionalDescr+" "+t.getClass().getSimpleName()+": "+t.getMessage()+" on thread "+Thread.currentThread().getName());
- t.printStackTrace();
- }
}
diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
index 6e6aaf58d..8fa4c581a 100644
--- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
+++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
@@ -50,6 +50,7 @@ import javax.media.opengl.GLProfile;
import javax.media.opengl.GLRunnable;
import javax.media.opengl.GLSharedContextSetter;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.locks.RecursiveLock;
import com.jogamp.opengl.GLAutoDrawableDelegate;
import com.jogamp.opengl.GLEventListenerState;
@@ -284,7 +285,7 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, GLStateKeepe
} catch( final Throwable t ) {
// Intentionally catch and ignore exception,
// so the destroy mechanism of the native windowing system is not corrupted!
- GLException.dumpThrowable("ignored", t);
+ ExceptionUtils.dumpThrowable("ignored", t);
}
}
}
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index 3deeafd27..3847b4042 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -60,6 +60,7 @@ import javax.media.opengl.GLException;
import javax.media.opengl.GLFBODrawable;
import javax.media.opengl.GLRunnable;
+import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.PropertyAccess;
/** Encapsulates the implementation of most of the GLAutoDrawable's
@@ -528,7 +529,7 @@ public class GLDrawableHelper {
if( null == firstCaught ) {
firstCaught = t;
} else {
- GLException.dumpThrowable("subsequent", t);
+ ExceptionUtils.dumpThrowable("subsequent", t);
}
}
disposeCount++;
@@ -544,7 +545,7 @@ public class GLDrawableHelper {
if( null == firstCaught ) {
firstCaught = t;
} else {
- GLException.dumpThrowable("subsequent", t);
+ ExceptionUtils.dumpThrowable("subsequent", t);
}
}
listenersToBeInit.add(listener);
@@ -1119,7 +1120,7 @@ public class GLDrawableHelper {
final Runnable initAction) {
if(null==context) {
if (DEBUG) {
- GLException.dumpThrowable("informal", new GLException("Info: GLDrawableHelper " + this + ".invokeGL(): NULL GLContext"));
+ ExceptionUtils.dumpThrowable("informal", new GLException("Info: GLDrawableHelper " + this + ".invokeGL(): NULL GLContext"));
}
return;
}
@@ -1201,7 +1202,7 @@ public class GLDrawableHelper {
}
if( null != disposeCaught ) {
if( null != contextCloseCaught ) {
- GLException.dumpThrowable("subsequent", contextCloseCaught);
+ ExceptionUtils.dumpThrowable("subsequent", contextCloseCaught);
}
throw disposeCaught;
}
@@ -1305,7 +1306,7 @@ public class GLDrawableHelper {
if( null != glEventListenerCaught ) {
flushGLRunnables();
if( null != contextReleaseCaught ) {
- GLException.dumpThrowable("subsequent", contextReleaseCaught);
+ ExceptionUtils.dumpThrowable("subsequent", contextReleaseCaught);
}
throw GLException.newGLException(glEventListenerCaught);
}
@@ -1427,7 +1428,7 @@ public class GLDrawableHelper {
if( null != glEventListenerCaught ) {
flushGLRunnables();
if( null != contextReleaseCaught ) {
- GLException.dumpThrowable("subsequent", contextReleaseCaught);
+ ExceptionUtils.dumpThrowable("subsequent", contextReleaseCaught);
}
throw GLException.newGLException(glEventListenerCaught);
}