summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java b/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
index 8479c757..861f8c68 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
@@ -17,21 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.util;
-
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.PrintWriter;
-
public class ExceptionFormatter {
/**
- * Routines for pretty-printing java exceptions
- * prints okay in a single-line.
+ * Routines for pretty-printing java exceptions prints okay in a
+ * single-line.
*/
/*
- * Take an exception stacktrace, and reformat it so that is
- * prints okay in a single-line.
+ * Take an exception stacktrace, and reformat it so that is prints okay in a
+ * single-line.
*/
public static String getStackTraceAsString(Throwable e) {
@@ -39,7 +37,7 @@ public class ExceptionFormatter {
try {
PipedOutputStream po = new PipedOutputStream();
- PipedInputStream pi = new PipedInputStream(po);
+ PipedInputStream pi = new PipedInputStream(po);
PrintWriter ps = new PrintWriter(po);
@@ -48,7 +46,7 @@ public class ExceptionFormatter {
int avail = pi.available();
byte[] b = new byte[avail];
-
+
pi.read(b, 0, avail);
returnvalue = new String(b);
} catch (Exception ex) {
@@ -59,8 +57,7 @@ public class ExceptionFormatter {
/* test code below */
- public static void test()
- throws TestException {
+ public static void test() throws TestException {
throw new TestException("** testexception **");
}
@@ -79,7 +76,6 @@ public class ExceptionFormatter {
}
-
class TestException extends Exception {
/**
@@ -95,4 +91,3 @@ class TestException extends Exception {
}
}
-