diff options
author | Sven Gothel <[email protected]> | 2015-10-03 20:11:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-03 20:11:43 +0200 |
commit | 1d5d6391f2da4cc200340448df88651cf26f1f66 (patch) | |
tree | 12cb70a3bf12977854af9f166b03677320d4ac0b /src/java/com/jogamp/common/util/SourcedInterruptedException.java | |
parent | 026875dd5256051d4e3504f1d9b01f7ce2bb70ff (diff) |
Refine new API methods: ExceptionUtils, Uri (Add @since, refine arguments and API doc)
Diffstat (limited to 'src/java/com/jogamp/common/util/SourcedInterruptedException.java')
-rw-r--r-- | src/java/com/jogamp/common/util/SourcedInterruptedException.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/com/jogamp/common/util/SourcedInterruptedException.java b/src/java/com/jogamp/common/util/SourcedInterruptedException.java index 2483d5b..530f1e7 100644 --- a/src/java/com/jogamp/common/util/SourcedInterruptedException.java +++ b/src/java/com/jogamp/common/util/SourcedInterruptedException.java @@ -145,22 +145,22 @@ public class SourcedInterruptedException extends InterruptedException implements } @Override - public final void dumpCauseStack(final PrintStream s, final String causeStr, final int causeDepth) { - final String s0 = causeStr+"["+causeDepth+"]"; + public final void printCauseStack(final PrintStream s, final String causeStr, final int causeIdx, final int stackDepth) { + final String s0 = causeStr+"["+causeIdx+"]"; s.println(s0+" by "+getClass().getSimpleName()+": "+getMessage()+" on thread "+Thread.currentThread().getName()); - ExceptionUtils.dumpStack(s, getStackTrace(), 0, -1); + ExceptionUtils.dumpStack(s, getStackTrace(), 0, stackDepth); if( null != interruptSource ) { - ExceptionUtils.dumpCause(s, s0, interruptSource, 1, -1, -1); + ExceptionUtils.printCause(s, s0, interruptSource, 0, 1, stackDepth); } } @Override - public final void printStackTrace(final PrintStream s) { + public final void printStackTrace(final PrintStream s, final int causeDepth, final int stackDepth) { s.println(getClass().getSimpleName()+": "+getMessage()+" on thread "+Thread.currentThread().getName()); - ExceptionUtils.dumpStack(s, getStackTrace(), 0, -1); - final int causeDepth = ExceptionUtils.dumpCause(s, "Caused", getCause(), 1, -1, -1); + ExceptionUtils.dumpStack(s, getStackTrace(), 0, stackDepth); + ExceptionUtils.printCause(s, "Caused", getCause(), 0, causeDepth, stackDepth); if( null != interruptSource ) { - ExceptionUtils.dumpCause(s, "InterruptSource", interruptSource, causeDepth, -1, -1); + ExceptionUtils.printCause(s, "InterruptSource", interruptSource, 0, causeDepth, stackDepth); } } } |