Commit b4ee9288 authored by mmhatre's avatar mmhatre

Add ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204924 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 86f7c21f
......@@ -689,6 +689,7 @@ public class PayRecXfrPrc extends ProcessEJB implements PayRecXfrPrcLocal , PayR
errString = d.getMessage();
throw new ITMException(d);
}
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......
......@@ -117,7 +117,8 @@ public class PayableOpenings extends ValidatorEJB implements PayableOpeningsLoca
}
catch(Exception e)
{
System.out.println("Exception :[PayablesOpeningEJB]While Getting Date Format"+e.getMessage());
System.out.println("Exception :[PayablesOpeningEJB]While Getting Date Format"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
java.util.Date DateX = new java.util.Date();
java.text.SimpleDateFormat dtf= new SimpleDateFormat(format);
......
......@@ -100,6 +100,7 @@ public class PayablesOpeningConf extends ActionHandlerEJB implements PayablesO
{
System.out.println("[Exception :][]"+ex);
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 08-aug-2019
}
// select data from payables_hdr
......@@ -141,6 +142,7 @@ public class PayablesOpeningConf extends ActionHandlerEJB implements PayablesO
}
//Modified by Anjali R. on[20/09/2018][In case of exception,rollback the entire transaction][End]
se.printStackTrace();
throw new ITMException(se); //added by manish mhatre on 08-aug-2019
}
catch(Exception ex)
{
......@@ -156,6 +158,7 @@ public class PayablesOpeningConf extends ActionHandlerEJB implements PayablesO
}
//Modified by Anjali R. on[20/09/2018][In case of exception,rollback the entire transaction][End]
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 08-aug-2019
}
if(confirmed == null)
{
......@@ -821,6 +824,7 @@ public class PayablesOpeningConf extends ActionHandlerEJB implements PayablesO
}
//Modified by Anjali R. on[20/09/2018][In case of exception,rollback the entire transaction][End]
se.printStackTrace();
throw new ITMException(se); //added by manish mhatre on 08-aug-2019
}
catch(Exception ex1)
{
......
......@@ -59,7 +59,8 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
catch(Exception e)
{
System.out.println("::: PaymentExpenseEJB ::"+ e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return retString;
}
......@@ -1073,6 +1074,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
catch(Exception e)
{
System.out.println("Exception : [PaymentExpenseEJB][itemChanged(String,String)] :==>\n"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return valueXmlString;
}
......@@ -2134,11 +2136,13 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
{
se.printStackTrace();
System.out.println("Exception in itemChanged ::"+se.getMessage());
throw new ITMException(se); //added by manish mhatre on 08-aug-2019
}
catch(Exception e)
{
e.printStackTrace();
System.out.println("Exception in itemChanged ::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......@@ -2168,7 +2172,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
}//END OF ITEMCHNGE
private String findValue(String getCoulmn, String tableName, String columnName, String columnValue, Connection conn) throws SQLException
private String findValue(String getCoulmn, String tableName, String columnName, String columnValue, Connection conn) throws SQLException, ITMException
{
String sql="";
PreparedStatement pstmt = null;
......@@ -2199,6 +2203,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
{
e.printStackTrace();
System.out.println("Exception in findValue::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally {
if(rs != null)
......@@ -2232,7 +2237,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
}
}
private HashMap<String, Object> getCurrencyCodeItemChanged(Document dom, Connection conn) throws SQLException
private HashMap<String, Object> getCurrencyCodeItemChanged(Document dom, Connection conn) throws SQLException, ITMException
{
String sql = "", descr = "", acctCode = "",cctrCode = "", currCode = "", acctName = "", currencyName = "",
finEntity = "", currCodeFinent = "", siteCode = "", tranDateStr = "", acctPrdCode = "", payMode = "";
......@@ -2279,6 +2284,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
catch (Exception e) {
e.printStackTrace();
System.out.println("Exception in getCurrencyCodeItemChanged ::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally {
if(rs != null)
......@@ -2295,7 +2301,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
return returnMap;
}
private HashMap<String, Object> getSiteCodeItemChanged(Document dom, Connection conn) throws SQLException
private HashMap<String, Object> getSiteCodeItemChanged(Document dom, Connection conn) throws SQLException, ITMException
{
String sql = "", descr = "", acctCode = "",cctrCode = "", currCode = "", acctName = "", bankCode = "", bankName = "",
finEntity = "", siteCode = "", payMode = "", finEntDescr = "", currencyName = "";
......@@ -2434,6 +2440,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
catch (Exception e) {
e.printStackTrace();
System.out.println("Exception in getSiteCodeItemChanged ::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally {
if(rs != null)
......@@ -2450,7 +2457,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
return returnMap;
}
private HashMap<String, Object> getBankCodeItemChanged(Document dom, Connection conn) throws SQLException
private HashMap<String, Object> getBankCodeItemChanged(Document dom, Connection conn) throws SQLException, ITMException
{
String sql = "", bankCode = "", bankName = "", acctCode = "",cctrCode = "", currCode = "", acctName = "", currencyName = "",
finEntity = "", currCodeFinent = "", siteCode = "", tranDateStr = "", acctPrdCode = "", payMode = "";
......@@ -2657,6 +2664,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
catch (Exception e) {
e.printStackTrace();
System.out.println("Exception in getBankCodeItemChanged ::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally {
if(rs != null)
......@@ -2736,7 +2744,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
return msgType;
}
private double getCalculatedAmount(Document dom)
private double getCalculatedAmount(Document dom) throws ITMException
{
NodeList parentNodeList = null;
Node parentNode = null;
......@@ -2784,6 +2792,7 @@ public class PaymentExpenseEJB extends ValidatorEJB implements PaymentExpenseLoc
}
catch(Exception e){
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
System.out.println("Returned amount in getCalculatedAmount::: ["+netAmountBC+"]");
return netAmountBC;
......
......@@ -75,6 +75,7 @@ public class PaymentReq extends ValidatorEJB implements PaymentReqLocal,PaymentR
catch(Exception e)
{
System.out.println("Exception : PaymentReqEJB : wfValData(String xmlString) : ==>\n"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return (errString);
}
......@@ -252,6 +253,7 @@ conn = getConnection();
{
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......@@ -285,6 +287,7 @@ conn = getConnection();
catch(Exception e)
{
System.out.println("Exception : [PaymentReqEJB][itemChanged(String,String)] :==>\n"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return valueXmlString;
}
......@@ -502,6 +505,7 @@ conn = getConnection();
{
System.out.println("Exception ::"+ e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......
......@@ -318,11 +318,13 @@ conn = getConnection();
{
System.out.println(ie.getMessage());
ie.printStackTrace();
throw ie; //added by manish mhatre on 08-aug-2019
}
catch (Exception e)
{
System.out.println(e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......@@ -1801,7 +1803,7 @@ conn = getConnection();
return dueDate;
}
public String getPurcRate(String purcOrder, String itemCode, Connection conn)
public String getPurcRate(String purcOrder, String itemCode, Connection conn) throws ITMException
{
String provPurcOrder = "", disc = "", rate = "", retString = "";
PreparedStatement pstmt = null;
......@@ -1848,13 +1850,14 @@ conn = getConnection();
System.out.println("Error in getPurcRate ::: " + e.getMessage());
writeLog(filePtr,e,true); //ADDED BY ALKA 22/08/07 FOR WRITING IN LOG FILE FOR EXCEPTION THROWN
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
retString = rate + "," + disc;
System.out.println("retString from getPurcRate :::" + retString);
writeLog(filePtr,"retString from getPurcRate :::" + retString,true); //ADDED BY ALKA 24/08/07 FOR SOPs TO BE ADDED IN LOG FILE
return retString;
}
private String updateMessage(String resultString,String message)
private String updateMessage(String resultString,String message) throws ITMException
{
StringBuffer stbf = new StringBuffer();
try{
......@@ -1872,11 +1875,12 @@ conn = getConnection();
System.out.println("Exception in updateMessage : "+e);
writeLog(filePtr,e,true); //ADDED BY ALKA 22/08/07 FOR WRITING IN LOG FILE FOR EXCEPTION THROWN
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return stbf.toString();
}
private static void writeLog(File f,String ex,boolean flag)
private static void writeLog(File f,String ex,boolean flag) throws ITMException
{
try
{
......@@ -1884,10 +1888,12 @@ conn = getConnection();
pw.println(ex);
pw.close();
}
catch(Exception exWm){exWm.printStackTrace();}
catch(Exception exWm){exWm.printStackTrace();
throw new ITMException(exWm); //added by manish mhatre on 08-aug-2019
}
}
private static void writeLog(File f,Exception ex,boolean flag)
private static void writeLog(File f,Exception ex,boolean flag) throws ITMException
{
try
{
......@@ -1895,6 +1901,8 @@ conn = getConnection();
ex.printStackTrace(pw);
pw.close();
}
catch(Exception exWe){exWe.printStackTrace();}
catch(Exception exWe){exWe.printStackTrace();
throw new ITMException(exWe); //added by manish mhatre on 08-aug-2019
}
}
}
\ No newline at end of file
......@@ -648,7 +648,8 @@ public class PdcGivenIC extends ValidatorEJB implements PdcGivenRemote, PdcGiven
System.out.println("retString::::::::::" + retString);
} catch (Exception e) {
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return retString;
}
......
......@@ -1011,7 +1011,8 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
System.out.println("retString::::::::::" + retString);
} catch (Exception e) {
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
return retString;
}
......
......@@ -301,6 +301,7 @@ public class PorcpVouchCreateSch implements Schedule
}
e.printStackTrace();
conn.rollback();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......@@ -340,7 +341,7 @@ public class PorcpVouchCreateSch implements Schedule
return null;
}
private String intializingLog(String fileName)
private String intializingLog(String fileName) throws ITMException
{
String log="intializingLog_Failed";
......@@ -383,6 +384,7 @@ public class PorcpVouchCreateSch implements Schedule
{
System.out.println("Exception []::"+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
log ="intializingLog_Successesfull";
......
......@@ -49,6 +49,7 @@ conn = getConnection();
{
System.out.println("Exception :PurVouchChkAmtEJB :confirm():" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 08-aug-2019
}
finally
{
......
......@@ -350,12 +350,12 @@ public class PurcVchrMultiAttachmentBean
} catch (NamingException e)
{
e.printStackTrace();
retStr = e.getMessage();
//retStr = e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e);
} catch (Exception e)
{
e.printStackTrace();
retStr = e.getMessage();
//retStr = e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e);
}
......@@ -366,7 +366,7 @@ public class PurcVchrMultiAttachmentBean
retStr = genericUtility.transformToString(xslFileName, xmlData, CommonConstants.APPLICATION_CONTEXT + File.separator + "temp", "Output", ".html");
} catch (ITMException e)
{
retStr = e.getMessage();
//retStr = e.getMessage(); //commented by manish mhatre on 08-aug-2019
throw new ITMException(e);
}
......
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