diff options
author | Sven Gothel <[email protected]> | 2010-11-14 08:32:23 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-14 08:32:23 +0100 |
commit | 13f42c3d3601447aad545d1c950202d81d4f7ade (patch) | |
tree | 55b52bfd00cb9776c3c368e6c42c8314d8ba2c34 | |
parent | 9967c3401d2e4b1fd2677e459a7024fcfedc8814 (diff) |
Don't printStackTrace if the exception shall be catched for later use
-rw-r--r-- | src/java/com/jogamp/common/util/RunnableTask.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/java/com/jogamp/common/util/RunnableTask.java b/src/java/com/jogamp/common/util/RunnableTask.java index eac6255..d5622b2 100644 --- a/src/java/com/jogamp/common/util/RunnableTask.java +++ b/src/java/com/jogamp/common/util/RunnableTask.java @@ -81,9 +81,7 @@ public class RunnableTask implements Runnable { runnable.run(); } catch (Throwable t) { runnableException = t; - if(catchExceptions) { - runnableException.printStackTrace(); - } else { + if(!catchExceptions) { throw new RuntimeException(runnableException); } } finally { @@ -95,9 +93,7 @@ public class RunnableTask implements Runnable { runnable.run(); } catch (Throwable t) { runnableException = t; - if(catchExceptions) { - runnableException.printStackTrace(); - } else { + if(!catchExceptions) { throw new RuntimeException(runnableException); } } finally { |