summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
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, 12 insertions, 7 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 861f8c683..8479c757c 100644
--- a/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
+++ b/pki/base/common/src/com/netscape/cmscore/util/ExceptionFormatter.java
@@ -17,19 +17,21 @@
// --- 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) {
@@ -37,7 +39,7 @@ public class ExceptionFormatter {
try {
PipedOutputStream po = new PipedOutputStream();
- PipedInputStream pi = new PipedInputStream(po);
+ PipedInputStream pi = new PipedInputStream(po);
PrintWriter ps = new PrintWriter(po);
@@ -46,7 +48,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) {
@@ -57,7 +59,8 @@ public class ExceptionFormatter {
/* test code below */
- public static void test() throws TestException {
+ public static void test()
+ throws TestException {
throw new TestException("** testexception **");
}
@@ -76,6 +79,7 @@ public class ExceptionFormatter {
}
+
class TestException extends Exception {
/**
@@ -91,3 +95,4 @@ class TestException extends Exception {
}
}
+