浏览代码

异常处理

y1456 1 年之前
父节点
当前提交
64d78e2186
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      xh/xh/src/private/nc/bs/xh/impl/TransformAddImpl.java

+ 4 - 5
xh/xh/src/private/nc/bs/xh/impl/TransformAddImpl.java

@@ -45,7 +45,6 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 		// TODO Auto-generated method stub
 		InvocationInfoProxy.getInstance().setUserDataSource("nc65");
 		NCLocator.getInstance().lookup(ISecurityTokenCallback.class).token("NCSystem".getBytes(),"pfxx".getBytes());
-		InvocationInfoProxy.getInstance().setUserDataSource("nc65");
         try {
 			String createStr = buildJson(req, resp, this.getClass().getName());
 			JSONObject json = JSONObject.fromObject(createStr);
@@ -198,7 +197,7 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 	/*
 	 * 数据库查询
 	 */
-	private String SqlexecuteQuery(String out,String table,String key,String value) throws DAOException {
+	private String SqlexecuteQuery(String out,String table,String key,String value) throws Exception {
 		
 		String sql = "select "+out+" from "+table+" where "+key+" = '"+value+"' and nvl(dr,0)=0";
 		
@@ -206,7 +205,7 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 		try {
 			object = iuap.executeQuery(sql, new ColumnProcessor());
 			if (object==null) {
-				throw new DAOException("未查询到数据!请检查编码"+value+"是否正确!");
+				throw new Exception("未查询到数据!请检查编码"+value+"是否正确!");
 			}
 			
 			return object.toString();
@@ -220,7 +219,7 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 	/*
 	 * 查询转换类型pk
 	 */
-	private String QueryTrantype(String code,String group) throws DAOException {
+	private String QueryTrantype(String code,String group) throws Exception {
 		
 		String sql = "select pk_billtypeid from bd_billtype where pk_billtypecode = '"+code+"' and pk_group = '"+group+"' and nvl(dr,0)=0";
 		
@@ -228,7 +227,7 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
 		try {
 			object = iuap.executeQuery(sql, new ColumnProcessor());
 			if (object==null) {
-				throw new DAOException("未查询到数据!请检查编码"+code+"是否正确!");
+				throw new Exception("未查询到数据!请检查编码"+code+"是否正确!");
 			}
 			
 			return object.toString();