You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
415 B
Java
15 lines
415 B
Java
package com.nmgs.util;
|
|
|
|
import java.io.PrintWriter;
|
|
import java.io.StringWriter;
|
|
|
|
public class ExceptionUtil {
|
|
public static String getExceptionStr(Exception e){
|
|
StringWriter stringWriter = new StringWriter();
|
|
PrintWriter writer = new PrintWriter(stringWriter);
|
|
e.printStackTrace(writer);
|
|
StringBuffer buffer = stringWriter.getBuffer();
|
|
return buffer.toString();
|
|
}
|
|
}
|