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
{
......
......@@ -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