项目初始导入

This commit is contained in:
dell
2017-12-29 16:18:40 +08:00
commit 0788f42ae7
3221 changed files with 500217 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package com.nis.util;
import java.util.HashMap;
import java.util.Map;
public class OracleErrorCodeUtil {
/**
* 返回异常信息内容
*
* @param e
* @return
*/
public static String getOraCode(Exception e) {
if (e == null) {
return "";
}
String errorMessage = e.getMessage();
if (null != errorMessage && errorMessage.length() > 0) {
int index = errorMessage.toUpperCase().indexOf("ORA-");
if (index != -1) {
return errorMessage.substring(index + 4, index + 9);
}
}
return "";
}
}