数据库文档增加执行sql功能

This commit is contained in:
暮光:城中城
2019-08-21 20:39:43 +08:00
parent b62b521129
commit f0920be5a5
209 changed files with 139875 additions and 128 deletions

View File

@@ -0,0 +1,46 @@
package com.zyplayer.doc.core.util;
import java.io.PrintWriter;
import java.io.StringWriter;
/**
* 字符串操作类
*/
public final class StringUtil {
/**
* 获取错误信息
*
* @param e
* @return
* @author 暮光:城中城
*/
public static String getException(Throwable e) {
StringWriter sw = null;
PrintWriter pw = null;
try {
sw = new StringWriter();
pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
sw.flush();
return sw.toString();
} finally {
if (sw != null) {
try {
sw.close();
} catch (Exception e1) {
e1.printStackTrace();
}
}
if (pw != null) {
try {
pw.close();
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
}
}