Commit 7af411ff authored by mchauhan's avatar mchauhan

Added ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204579 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9995661d
......@@ -67,7 +67,8 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{
System.out.println("Exception :"+this.getClass().getName()+" :process(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
e.printStackTrace();
retStr = e.getMessage();
/*retStr = e.getMessage();*/
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retStr;
}
......@@ -231,7 +232,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return errString;
}// END OF PROCESS(2)
private HashMap<String, Integer> getItemDetails(String tranIdParent,String itemSer,Connection conn)
private HashMap<String, Integer> getItemDetails(String tranIdParent,String itemSer,Connection conn) throws ITMException
{
HashMap<String,Integer> itemMap = new HashMap<String,Integer>();
String sql="",itemCode="",itemSerHd="";
......@@ -261,11 +262,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{
e.printStackTrace();
itemMap=null;
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return itemMap;
}
public String getItemSerList(String itemser, Connection conn)
public String getItemSerList(String itemser, Connection conn) throws ITMException
{
String itemSerGrpValue="",itemSerSplit="",resultItemSer="";
PreparedStatement pstmt = null;
......@@ -302,11 +304,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{
e.printStackTrace();
}
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return resultItemSer;
}
private HashMap<String, String> getInvoiceDetails(String tranIdParent,Connection conn)
private HashMap<String, String> getInvoiceDetails(String tranIdParent,Connection conn) throws ITMException
{
HashMap<String,String> invMap = new HashMap<String,String>();
String sql="",invoiceId="",dlvFlg="";
......@@ -329,12 +332,13 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{
e.printStackTrace();
invMap=null;
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return invMap;
}
private String awacsGenProcess(String itemSer, String posCode,String custCode, String empCode, String prdCode,String tranIdParent, Date tranDate, String loginSiteCode,
String fromDateStr, String toDateStr,HashMap invMap,HashMap itemMap, String chgUser, String chgTerm, String xtraParams,UserInfoBean userInfo, Connection conn)
String fromDateStr, String toDateStr,HashMap invMap,HashMap itemMap, String chgUser, String chgTerm, String xtraParams,UserInfoBean userInfo, Connection conn) throws ITMException
{
boolean result=false;
CustStockGWTIC custStockGWTIC =new CustStockGWTIC();
......@@ -586,6 +590,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
e.printStackTrace();
result=false;
logList.add(e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -611,7 +616,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return errString;
}
private void callPstRs(PreparedStatement pstmt, ResultSet rs) {
private void callPstRs(PreparedStatement pstmt, ResultSet rs) throws ITMException {
try {
if(pstmt!=null)
{
......@@ -673,11 +678,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
}catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retString;
}
private void writeLog(String fileName, ArrayList<String> logList,String logDate)
private void writeLog(String fileName, ArrayList<String> logList,String logDate) throws ITMException
{
String jBossHome = CommonConstants.JBOSSHOME;
FileWriter localFileWriter = null;
......@@ -701,10 +707,11 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
}
private int isCustExist(String prdCode, String custCode, String itemSer, PreparedStatement pstmt, ResultSet rs, Connection conn)
private int isCustExist(String prdCode, String custCode, String itemSer, PreparedStatement pstmt, ResultSet rs, Connection conn) throws ITMException
{
String sql="";
int custCntr=0;
......@@ -727,6 +734,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{
e.printStackTrace();
System.out.println("custCnt SQLException"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -751,7 +759,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return custCntr;
}
private String getTranIdLast(String orderType, String itemSer,String custCode,Connection conn)
private String getTranIdLast(String orderType, String itemSer,String custCode,Connection conn) throws ITMException
{
String sql="",tranIdLast="";
PreparedStatement pstmt=null;
......@@ -795,6 +803,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment