1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus.util;
|
3
|
|
import java.io.StringWriter;
|
4
|
|
import java.io.PrintWriter;
|
5
|
|
|
6
|
|
/**
|
7
|
|
* Various utility methods for string manipulation.
|
8
|
|
*
|
9
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
10
|
|
*
|
11
|
|
* @version $Id: StringUtil.html,v 1.1 2003/04/14 12:27:33 sinisa Exp $
|
12
|
|
*/
|
13
|
|
public class StringUtil {
|
14
|
|
/**
|
15
|
|
* @param theThrowable the exception from which to extract the stack trace
|
16
|
|
* as a String
|
17
|
|
* @return the exception stack trace as a String
|
18
|
|
*/
|
19
|
0
|
public static String exceptionToString(Throwable theThrowable) {
|
20
|
0
|
StringWriter sw = new StringWriter();
|
21
|
0
|
PrintWriter pw = new PrintWriter(sw);
|
22
|
0
|
theThrowable.printStackTrace(pw);
|
23
|
0
|
return sw.toString();
|
24
|
|
}
|
25
|
|
|
26
|
|
/**
|
27
|
|
* Various utility methods for string manipulation.
|
28
|
|
*
|
29
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
30
|
|
*
|
31
|
|
* @version $Id: StringUtil.html,v 1.1 2003/04/14 12:27:33 sinisa Exp $
|
32
|
|
*/
|
33
|
0
|
public StringUtil() {
|
34
|
0
|
super();
|
35
|
|
}
|
36
|
|
}
|