Commit c29a24f4 authored by mmhatre's avatar mmhatre

Add ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204786 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f5fba849
......@@ -503,7 +503,7 @@ catch (Exception e)
.println("FileNotFoundException :ContributionProcess :readFile(String).."
+ fe.getMessage());
fe.printStackTrace();
errString = fe.getMessage();
//errString = fe.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(fe);
}
......@@ -512,7 +512,7 @@ catch (Exception e)
.println("Exception :ContributionProcess :readFile(String).."
+ e.getMessage());
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
return sqlQry;
......
......@@ -265,7 +265,7 @@ conn = getConnection();
}
} catch (Exception e) {
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
} finally {
try {
......
......@@ -49,7 +49,8 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
catch (Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}//end of the wfvaldata
......
......@@ -61,7 +61,8 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
catch(Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::"+ e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......@@ -739,7 +740,8 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
catch(Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::"+ e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......@@ -1400,7 +1402,7 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
//FOR GET DETAIL2 COUNT
public double getNumOftotalallocPercentage(Document dom2,String CurrentLineNo)
public double getNumOftotalallocPercentage(Document dom2,String CurrentLineNo) throws ITMException
{
String perAmt="",lineNo="",updateFlag="";
......@@ -1443,6 +1445,7 @@ public class CostallocIC extends ValidatorEJB implements CostallocICRemote, Cost
{
System.out.println("Exception : : getNumOfNonDelDetail :"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return num;
}
......
......@@ -221,7 +221,7 @@ public class CostallocPrs extends ValidatorEJB implements CostallocPrsLocal, Cos
}
return input;
}
private String getAttribValue(Node detailNode, String nodeName, String attribStr)
private String getAttribValue(Node detailNode, String nodeName, String attribStr) throws ITMException
{
String attribValue = "";
try
......@@ -237,10 +237,11 @@ public class CostallocPrs extends ValidatorEJB implements CostallocPrsLocal, Cos
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return attribValue;
}
private String getAttribValue(Node detailNode, String attribStr)
private String getAttribValue(Node detailNode, String attribStr) throws ITMException
{
String attribValue = "";
try
......@@ -257,6 +258,7 @@ public class CostallocPrs extends ValidatorEJB implements CostallocPrsLocal, Cos
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return attribValue;
}
......
......@@ -3330,7 +3330,7 @@ public class CreatePoRcpVoucher
//Sarita - Migrated Method gbf_check_repl_rcp[nvo_business_object_dist_voucher] on 10 AUG 18 [END]
//Added by sarita on 10 AUG 18 [START]
private String replaceErrorMsg (String retErrXml ,String tagName , String replaceWith)
private String replaceErrorMsg (String retErrXml ,String tagName , String replaceWith) throws ITMException
{
E12GenericUtility genericUtility = new E12GenericUtility();
Document dom = null;
......@@ -3366,6 +3366,7 @@ public class CreatePoRcpVoucher
catch(Exception e)
{
System.out.println(e.getMessage());
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return changedErrorString;
}
......
......@@ -586,7 +586,7 @@ conn = getConnection();
}//end of switch
} catch (Exception e) {
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
} finally {
try {
......
......@@ -32,12 +32,13 @@ public class CustBankConf extends ActionHandlerEJB implements CustBankConfLocal,
System.out.println("Exception :CustBankConf :confirm():" + e.getMessage() + ":");
retString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
private String confirmCBank(String tranId,String xtraParams,String forcedFlag)
private String confirmCBank(String tranId,String xtraParams,String forcedFlag) throws ITMException
{
System.out.println("---------Class : CustBankConf-->> confirm method called-----------");
String CustCode = null;
......@@ -133,6 +134,7 @@ public class CustBankConf extends ActionHandlerEJB implements CustBankConfLocal,
catch(Exception e){
System.out.println("Exception : Occure during rollback........");e.printStackTrace();
}
throw new ITMException(se); //added by manish mhatre on 07-aug-2019
}
catch(Exception e)
{
......@@ -145,7 +147,7 @@ public class CustBankConf extends ActionHandlerEJB implements CustBankConfLocal,
}
e.printStackTrace();
System.out.println("Exception Class [StrgCustBankConf]::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -33,12 +33,13 @@ public class CustBankDeactivate extends ActionHandlerEJB implements CustBankDeac
System.out.println("Exception :CustBankDeactivate :confirm():" + e.getMessage() + ":");
retString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
private String deactive(String tranId,String xtraParams,String forcedFlag)
private String deactive(String tranId,String xtraParams,String forcedFlag) throws ITMException
{
System.out.println("---------Class : CustBankDeactivate-->> deactive method called-----------");
String CustCode = null;
......@@ -122,6 +123,7 @@ public class CustBankDeactivate extends ActionHandlerEJB implements CustBankDeac
catch(Exception e){
System.out.println("Exception : Occure during rollback........");e.printStackTrace();
}
throw new ITMException(se); //added by manish mhatre on 07-aug-2019
}
catch(Exception e)
{
......@@ -134,7 +136,7 @@ public class CustBankDeactivate extends ActionHandlerEJB implements CustBankDeac
}
e.printStackTrace();
System.out.println("Exception Class [CustBankDeactivate]::"+e.getMessage());
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -49,7 +49,8 @@ public class DeprItemSeriesIC extends ValidatorEJB implements DeprItemSeriesICLo
catch(Exception e)
{
System.out.println("::: DeprItemSeriesIC ::"+ e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......@@ -329,7 +330,8 @@ public class DeprItemSeriesIC extends ValidatorEJB implements DeprItemSeriesICLo
catch(Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::"+ e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......
......@@ -76,7 +76,7 @@ public class DeprRev extends ProcessEJB implements DeprRevLocal , DeprRevRemote
catch (Exception e)
{
System.out.println("Exception :Xform :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
rtrStr = e.getMessage();
//rtrStr = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException( e );
}
return rtrStr;
......
......@@ -59,7 +59,8 @@ public class DisputedRecvIC extends ValidatorEJB implements DisputedRecvICLocal,
catch (Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......@@ -333,7 +334,7 @@ public class DisputedRecvIC extends ValidatorEJB implements DisputedRecvICLocal,
catch(Exception e)
{
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
finally
......@@ -397,7 +398,8 @@ public class DisputedRecvIC extends ValidatorEJB implements DisputedRecvICLocal,
catch (Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage();
//e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
......@@ -769,6 +771,7 @@ public class DisputedRecvIC extends ValidatorEJB implements DisputedRecvICLocal,
{
System.out.println("POrderIC Exception ::" + e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -411,7 +411,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
} catch (Exception e) {
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
} finally {
try {
......@@ -886,6 +886,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
}
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
} finally {
try {
} catch (Exception e) {
......@@ -899,7 +900,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
}
@SuppressWarnings("unused")
private boolean ischqAmtGreater(Document dom, double chqAmt, String lineNo) {
private boolean ischqAmtGreater(Document dom, double chqAmt, String lineNo) throws ITMException {
NodeList parentList = null, childList = null;
Node parentNode = null, childNode = null;
String rcpAmtSt = "";
......@@ -943,6 +944,7 @@ public class EcollectionIC extends ValidatorEJB implements EcollectionICLocal, E
}
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
} finally {
try {
} catch (Exception e) {
......
......@@ -37,7 +37,7 @@ public class EcollectionPostSave extends ValidatorEJB implements EcollectionPost
return errString;
}
public String postSave(Document dom, String tranId, String xtraParams, Connection conn) {
public String postSave(Document dom, String tranId, String xtraParams, Connection conn) throws ITMException {
System.out.println("in EcollectionPostSave tran_id---->>[" + tranId + "]");
ResultSet rs = null;
PreparedStatement pstmt = null;
......@@ -151,6 +151,7 @@ public class EcollectionPostSave extends ValidatorEJB implements EcollectionPost
.println("Exception while rollbacking transaction....");
e1.printStackTrace();
}
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return errorString;
}
......@@ -159,7 +160,7 @@ public class EcollectionPostSave extends ValidatorEJB implements EcollectionPost
return columnValue == null ? "" : columnValue;
}
private boolean isChqAmtGreater(Document dom, double chqAmt) {
private boolean isChqAmtGreater(Document dom, double chqAmt) throws ITMException {
NodeList parentList = null, childList = null;
Node parentNode = null, childNode = null;
......@@ -205,6 +206,7 @@ public class EcollectionPostSave extends ValidatorEJB implements EcollectionPost
}
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
} finally {
try {
} catch (Exception e) {
......
......@@ -548,7 +548,7 @@ public class EcollectionSchedule implements Schedule {
return retString;
}
private String intializingLog(String fileName) {
private String intializingLog(String fileName) throws ITMException {
String log = "intializingLog_Failed";
String strToWrite = "";
String currTime = null;
......@@ -580,6 +580,7 @@ public class EcollectionSchedule implements Schedule {
} catch (Exception e) {
System.out.println("Exception []::" + e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
log = "intializingLog_Successesfull";
return log;
......
......@@ -321,7 +321,7 @@ public class EcollectionSubIC extends ValidatorEJB implements
}
} catch (Exception e) {
e.printStackTrace();
errString = e.getMessage();
//errString = e.getMessage(); //commented bymanish mhatre on 07-aug-2019
throw new ITMException(e);
} finally {
try {
......
......@@ -83,6 +83,7 @@ public String wfValData() throws RemoteException,ITMException
System.out.println("Exception :EmpCctrEJB :wfValData(String xmlString):" + e.getMessage() + ":");
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
System.out.println("returning from EmpCctrEJB wfValData");
return (errString);
......@@ -172,6 +173,7 @@ public String wfValData() throws RemoteException,ITMException
System.out.println("Exception :EmpCctrEJB :wfValData(Document dom):" + e.getMessage() + ":");
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
System.out.println("error :"+errString);
return (errString);
......@@ -209,7 +211,8 @@ public String wfValData() throws RemoteException,ITMException
catch(Exception e)
{
System.out.println("Exception :EmpCctrItmChngEJB :itemChanged(String,String) :==>\n"+e.getMessage());
valueXmlString = genericUtility.createErrorString(e);
valueXmlString = genericUtility.createErrorString(e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return valueXmlString.toString();
}
......@@ -267,6 +270,7 @@ conn = getConnection();
catch(Exception e)
{
System.out.println("Exception in EmpCctrItmChngEJB.java occured");
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -103,6 +103,7 @@ public class FailedBusiLogicConf implements Schedule
System.out.println(">>>>>>>>>>>>>In catch:");
e.printStackTrace();
System.out.println(e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -118,11 +119,12 @@ public class FailedBusiLogicConf implements Schedule
return retString;
}
private void closePstmtRs(PreparedStatement pStmt, ResultSet rs) {
private void closePstmtRs(PreparedStatement pStmt, ResultSet rs) throws ITMException {
if (pStmt != null) {
try {
pStmt.close();
} catch (SQLException localSQLException1) {
throw new ITMException(localSQLException1); //added by manish mhatre on 07-aug-2019
}
pStmt = null;
}
......@@ -131,6 +133,7 @@ public class FailedBusiLogicConf implements Schedule
rs.close();
} catch (SQLException e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
rs = null;
}
......@@ -255,6 +258,7 @@ public class FailedBusiLogicConf implements Schedule
catch (Exception eX)
{
eX.printStackTrace();
throw new ITMException(eX); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -970,7 +970,7 @@ public class FinCommon
{
System.out.println("Exception []::acctbalOpnUpd():" + e.getMessage() + ":");
e.printStackTrace();
retString = e.getMessage();
//retString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
......@@ -2186,7 +2186,7 @@ public class FinCommon
{
System.out.println("Exception []::gbf_acctbal_upd():" + e.getMessage() + ":");
e.printStackTrace();
retString = e.getMessage();
//retString = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
......@@ -2319,6 +2319,7 @@ public class FinCommon
catch(Exception e)
{
System.out.println("Exception :: [][getDailyExchRateSellBuy] ::"+e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
// Added by Nandkumar Gadkari on 17MAR2018-----------end----------
// GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -2364,6 +2365,7 @@ public class FinCommon
catch(Exception e)
{
System.out.println("Exception :: [][getDailyExchRateSellBuy] ::"+e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
}
else
......@@ -2413,13 +2415,14 @@ public class FinCommon
catch(SQLException e)
{
System.out.println("Exception :: [][getDailyExchRateSellBuy]"+sql+e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
catch(Exception ex)
{
System.out.println("Exception []::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}
finally // FINALLY BLOCK ADDED BY ALKA
{
......@@ -2504,11 +2507,13 @@ public class FinCommon
catch(SQLException e)
{
System.out.println("Exception ::[][getDailyExchRateSellBuy]"+sql+e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
catch(Exception ex)
{
System.out.println("Exception []::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}
finally // FINALLY BLOCK ADDED BY ALKA
{
......@@ -2644,6 +2649,7 @@ public class FinCommon
catch(SQLException e)
{
System.out.println("Exception [][getDailyExchRateSellBuy]"+e);
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
catch(Exception ex)
{
......@@ -2857,7 +2863,7 @@ public class FinCommon
catch(Exception e)
{
System.out.println("Exception :ITMDBAccessEJB :isAcctCode:" + e.getMessage() + ":");
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
System.out.println("errCode ::: " + errCode);
......@@ -2981,7 +2987,7 @@ public class FinCommon
catch(Exception e)
{
System.out.println("Exception :ITMDBAccessEJB :isCctrCode:" + e.getMessage() + ":");
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
System.out.println("errCode ::: " + errCode);
......@@ -2999,7 +3005,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isSundryCode(String siteCode, String sundryType, String sundryCode, String refSer, Connection conn)
public String isSundryCode(String siteCode, String sundryType, String sundryCode, String refSer, Connection conn) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -3091,9 +3097,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3128,7 +3135,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isStrgCustomer(String siteCode,String custCode,String refSer, Connection conn)
public String isStrgCustomer(String siteCode,String custCode,String refSer, Connection conn) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -3154,9 +3161,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3192,7 +3200,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isAnalysis(String acctCode, String analCode, String refSer, Connection conn)
public String isAnalysis(String acctCode, String analCode, String refSer, Connection conn) throws ITMException
{
// To check Analysis code in analysis table
PreparedStatement pstmt = null, pstmt1 = null;
......@@ -3256,9 +3264,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3301,7 +3310,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isLoanParty(String siteCode,String loanCode,String refSer, Connection conn)
public String isLoanParty(String siteCode,String loanCode,String refSer, Connection conn) throws ITMException
{
// CHECKING WHETHER LOANPARTY HAS TO BE CHECKED IN SITE TABLE OR NOT
// IF VAR VALUE IN FINPARM IS Y CHECK IN SITE_LOANPARTY AND IF 'N'
......@@ -3352,15 +3361,17 @@ public class FinCommon
}
catch (ITMException ie)
{
errCode = ie.getMessage();
//errCode = ie.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+ ie);
ie.printStackTrace();
throw new ITMException(ie); //added by manish mhatre on 07-aug-2019
}
catch (Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+ e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return errCode;
......@@ -3375,7 +3386,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isTaxAuth(String siteCode,String tauthCode,String refSer, Connection conn)
public String isTaxAuth(String siteCode,String tauthCode,String refSer, Connection conn) throws ITMException
{
// CHECKING IN TAX AUTHORITY MASTER
......@@ -3403,9 +3414,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return errCode;
}
......@@ -3419,7 +3431,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isSupplier(String siteCode,String suppCode,String refSer, Connection conn)
public String isSupplier(String siteCode,String suppCode,String refSer, Connection conn) throws ITMException
{
String errCode = "";
PreparedStatement pstmt = null;
......@@ -3497,9 +3509,10 @@ public class FinCommon
}
catch (Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+ e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3534,7 +3547,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isEmployee(String siteCode,String empCode,String refSer, Connection conn)
public String isEmployee(String siteCode,String empCode,String refSer, Connection conn) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -3561,9 +3574,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3598,7 +3612,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isSalesPerson(String siteCode,String spersCode,String refSer, Connection conn)
public String isSalesPerson(String siteCode,String spersCode,String refSer, Connection conn) throws ITMException
{
// CHECKING WHETHER SALES_PERSON HAS TO BE CHECKED IN SITE TABLE OR NOT
// IF VAR VALUE IN DISPARM IS Y CHECK IN SITE_SALES_PERS AND IF 'N'
......@@ -3660,9 +3674,10 @@ public class FinCommon
}
catch (Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+ e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3697,7 +3712,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String isAcctType(String acctCode, String sundryCode, String sundryType, Connection conn)
public String isAcctType(String acctCode, String sundryCode, String sundryType, Connection conn) throws ITMException
{
String errCode = null;
PreparedStatement pstmt = null;
......@@ -3754,9 +3769,10 @@ public class FinCommon
}
catch (Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+ e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3790,7 +3806,7 @@ public class FinCommon
* @return Error code if not valid
* @exception ITMException
*/
public String checkTaxEnvStatus(String taxEnv, Timestamp date, Connection conn)
public String checkTaxEnvStatus(String taxEnv, Timestamp date, Connection conn) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -3819,9 +3835,10 @@ public class FinCommon
}
catch(Exception e)
{
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -3856,7 +3873,7 @@ public class FinCommon
* @return Name or cheque name
* @exception ITMException
*/
public String getChequeName(String sundryType, String sundryCode, String cheque_or_name, Connection conn)
public String getChequeName(String sundryType, String sundryCode, String cheque_or_name, Connection conn) throws ITMException
{
String sName = null, chqName = null, fName = null, mName = null, lName = null;
PreparedStatement pstmt = null;
......@@ -4128,6 +4145,7 @@ public class FinCommon
{
System.out.println("Exception in getChequeName ::"+e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -15888,14 +15906,14 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
catch (ITMException itme)
{
System.out.println("ITmException : ValidatorNEJB : nfCheckPeriod :==>\n"); //$NON-NLS-1$
errCode = itme.getMessage();
//errCode = itme.getMessage(); //commented by manish mhatre on 07-aug-2019
throw itme;
}
catch (Exception e)
{
System.out.println("Exception : ValidatorNEJB : nfCheckPeriod :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
finally
......@@ -16034,7 +16052,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception : ValidatorEJB : isBankCode :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
return errCode;
......@@ -16073,7 +16091,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception : ValidatorEJB : isSiteCode :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
return errCode;
......@@ -16113,7 +16131,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception : ValidatorEJB : isFinEntity :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
return errCode;
......@@ -16244,7 +16262,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception : ValidatorEJB : isCustomer :==>\n"+e.getMessage()); //$NON-NLS-1$
e.printStackTrace();
errCode = e.getMessage();
//errCode = e.getMessage(); //commented by manish mhatre on 07-aug-2019
throw new ITMException(e);
}
return errCode;
......@@ -16283,6 +16301,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}
return errString;
......@@ -16312,6 +16331,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}
return errString;
......@@ -16581,7 +16601,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
//Added by Anjali R. on[30/04/2018][Migrated method gbf_calc_discountdate][End]
//Added by Anjali R. on[30/04/2018][Migrated method gf_bankcharges_calc][Start]
public double getBankChargesCalc(String bankCode,String payMode,java.util.Date date ,double amount,Connection conn)
public double getBankChargesCalc(String bankCode,String payMode,java.util.Date date ,double amount,Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
......@@ -16708,6 +16728,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception from getBankChargesCalc--["+ e.getMessage() +"]");
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -16735,7 +16756,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
//Added by Anjali R. on[02/05/2018][Migrated method gbf_payable_at from nvo_business_object_fin component][Start]
public String getPayableAt(String sundryType,String sundryCode,String bankCode,Connection conn)
public String getPayableAt(String sundryType,String sundryCode,String bankCode,Connection conn) throws ITMException
{
String sql = "";
PreparedStatement pstmt = null;
......@@ -16899,6 +16920,7 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
System.out.println("Exception from getPayableAt--["+ e.getMessage() +"]");
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally
{
......
......@@ -567,6 +567,7 @@ conn = getConnection();
{
System.out.println("Exception : [FixedAssetTransf ][itemChanged(String,String)] :==>\n"+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return valueXmlString;
}
......@@ -922,7 +923,7 @@ conn = getConnection();
return valueXmlString.toString();
}
private String errorType( Connection conn , String errorCode )
private String errorType( Connection conn , String errorCode ) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -942,6 +943,7 @@ conn = getConnection();
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}
finally
{
......@@ -973,7 +975,7 @@ conn = getConnection();
}
return input.trim();
}
protected String getNameOrDescrForCode(Connection conn, String table_name, String descr_col_name,String whrCondCol, String whrCondVal)
protected String getNameOrDescrForCode(Connection conn, String table_name, String descr_col_name,String whrCondCol, String whrCondVal) throws ITMException
{
String descr = null;
......@@ -1001,11 +1003,13 @@ conn = getConnection();
{
System.out.println("SQL Exception In getNameOrDescrForCode method of FixedAssetTransf Class : "+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
catch(Exception ex)
{
System.out.println("Exception In getNameOrDescrForCode method of FixedAssetTransf Class : "+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}finally{
try{
......@@ -1027,12 +1031,13 @@ conn = getConnection();
throw new SQLException("Connection passed to FixedAssetTransf.getNameOrDescrForCode() method is null");
} catch (SQLException e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
}
return descr;
}
protected int getDBRowCount(Connection conn, String table_name, String whrCondCol, String whrCondVal)
protected int getDBRowCount(Connection conn, String table_name, String whrCondCol, String whrCondVal) throws ITMException
{
int count=-1;
......@@ -1057,11 +1062,13 @@ conn = getConnection();
{
System.out.println("SQL Exception In getDBRowCount method of FixedAssetTransf Class : "+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
catch(Exception ex)
{
System.out.println("Exception In getDBRowCount method of FixedAssetTransf Class : "+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //added by manish mhatre on 07-aug-2019
}finally{
try{
......@@ -1082,7 +1089,8 @@ conn = getConnection();
try {
throw new SQLException("Connection passed to FixedAssetTransf.getDBRowCount() method is null");
} catch (SQLException e) {
e.printStackTrace();
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
}
......
......@@ -67,13 +67,14 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
+ e.getMessage() + ":");
retString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return retString;
}
private String confirmFixedAssetTransf(String tranId, String xtraParams,
String forcedFlag) {
String forcedFlag) throws ITMException {
ResultSet rs = null;
Connection conn = null;
ConnDriver ConnDriver = new ConnDriver();
......@@ -200,6 +201,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
} finally {
try {
if (conn != null) {
......@@ -218,6 +220,7 @@ public class FixedAssetTransfConf extends ActionHandlerEJB implements
} catch (Exception e) {
System.out.println("Exception while closing Connection.......");
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
return errString;
......@@ -2875,7 +2878,7 @@ conn = getConnection();
}
protected String getNameOrDescrForCode(Connection conn, String table_name,
String descr_col_name, String whrCondCol, String whrCondVal) {
String descr_col_name, String whrCondCol, String whrCondVal) throws ITMException {
String descr = null;
if (conn != null) {
......@@ -2912,6 +2915,7 @@ conn = getConnection();
} catch (SQLException se) {
se.printStackTrace();
}
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
finally {
......@@ -2939,6 +2943,7 @@ conn = getConnection();
}
} catch (SQLException se) {
se.printStackTrace();
throw new ITMException(se); //added by manish mhatre on 07-aug-2019
}
} else {
try {
......@@ -2946,6 +2951,7 @@ conn = getConnection();
"Connection passed to FixedAssetTransf.getNameOrDescrForCode() method is null");
} catch (SQLException e) {
e.printStackTrace();
throw new ITMException(e); //added by manish mhatre on 07-aug-2019
}
}
......
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