Commit ff1e5956 authored by vvengurlekar's avatar vvengurlekar

ReceivablesOpeningConf.java - throw itmexception added in catch


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192034 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 76b10ad5
......@@ -156,6 +156,8 @@ conn = getConnection();
catch(Exception e)
{
System.out.println("Exception :03: connecting Database [confirmReceivables] : " + e);
//added throws clause by Varsha V
throw new ITMException(e);
}
try
{
......@@ -201,16 +203,20 @@ conn = getConnection();
catch(Exception e)
{
System.out.println("Exception --["+ e.getMessage()+"]");
//added throws clause by Varsha V
throw new ITMException(e);
}
//ended by Varsha V on 11-10-18 for closing connection
System.out.println("SQLException [04][confirmReceivables][Excuting Query Failed]" + sqlHdr + se.getMessage());
se.printStackTrace();
retString = se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
catch(Exception e)
{
//added by Varsha V on 11-10-18 for closing connection
//added by Varsha V on 11-10-18 for closing connection
try
{
if(rs != null)
......@@ -233,7 +239,9 @@ conn = getConnection();
System.out.println("Exception [05][confirmReceivables][Excuting Query Failed]" + sqlHdr + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -250,6 +258,8 @@ conn = getConnection();
e.printStackTrace();
retString = e.getMessage();
System.out.println("Exception In Closing Statement and ResultSet" + retString);
//added throws clause by Varsha V
throw new ITMException(e);
//return retString; //Gulzar 04-12-06
}
}
......@@ -340,11 +350,13 @@ conn = getConnection();
{
System.out.println("Exception --["+ e.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
//Ended by Varsha V on 11-10-18 for closing connection
System.out.println("SQLException [07][confirmReceivables][Excuting Query Failed]" + sql + se.getMessage());
se.printStackTrace();
retString = se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
catch(Exception e)
{
......@@ -367,11 +379,13 @@ conn = getConnection();
{
System.out.println("Exception --["+ e1.getMessage()+"]");
}
//ended by Varsha V on 11-10-18 for closing connection
//Ended by Varsha V on 11-10-18 for closing connection
System.out.println("Exception [08][confirmReceivables]" + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -386,7 +400,9 @@ conn = getConnection();
{
System.out.println("Exception [09][confirmReceivables]" + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
retString = e.getMessage();
//added throws clause by Varsha V
throw new ITMException(e);
}
}
System.out.println("CNT : " + cnt);
......@@ -540,7 +556,9 @@ conn = getConnection();
}
se.printStackTrace();
retString = se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
catch(Exception e)
{
......@@ -572,7 +590,9 @@ conn = getConnection();
System.out.println("Exception [11][confirmReceivables][Excuting Query Failed]" + sqlIns + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -589,6 +609,8 @@ conn = getConnection();
System.out.println("Exception [12][confirmReceivables]" + sqlIns + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
//added throws clause by Varsha V
throw new ITMException(e);
//return retString; //Gulzar 04-12-06
}
}
......@@ -669,7 +691,7 @@ conn = getConnection();
pstmt.close();
pstmt = null;
}
//ended by Varsha V on 11-10-18 for closing connection
//added by Varsha V on 11-10-18 for closing connection
conn.rollback();
}
catch(Exception e)
......@@ -678,7 +700,9 @@ conn = getConnection();
}
se.printStackTrace();
retString = se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
catch(Exception e)
{
......@@ -700,7 +724,9 @@ conn = getConnection();
e = e1;
}
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -721,6 +747,8 @@ conn = getConnection();
System.out.println("Exception [15][confirmReceivables]" + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
//added throws clause by Varsha V
throw new ITMException(e);
//return retString; //Gulzar 04-12-06
}
}
......@@ -845,8 +873,8 @@ conn = getConnection();
{
System.out.println("SQLException[16] :[ReceivablesOpeningConfEJB][Excuting Query Failed]" + sql + se.getMessage());
se.printStackTrace();
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
......@@ -854,13 +882,15 @@ conn = getConnection();
}
//ended by Varsha V on 11-10-18 for closing connection
retString = se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
catch(Exception e)
{
retString = "Not Confirmed";
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
conn.rollback();//Added by Jiten 27/07/06
//added by Varsha V on 11-10-18 for closing connection
if(pstmt != null)
{
pstmt.close();
......@@ -870,7 +900,9 @@ conn = getConnection();
System.out.println("Exception[17] ::"+e.getMessage());
e.printStackTrace();
retString = "Not Confirmed :" + e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -893,7 +925,9 @@ conn = getConnection();
System.out.println("SQLException [18] Connection Error Closed :" + se.getMessage());
se.printStackTrace();
retString = "Connection Not Closed :" + se.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(se);
//return retString;
}
}//finally
} // try
......@@ -907,7 +941,9 @@ conn = getConnection();
}
catch(Exception e1){}
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -934,7 +970,9 @@ conn = getConnection();
System.out.println("Exception [20][confirmReceivables]" + sqlHdr + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
}
} // else
......@@ -945,7 +983,9 @@ conn = getConnection();
System.out.println("Exception [20][confirmReceivables]" + sqlHdr + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
finally
{
......@@ -1002,7 +1042,9 @@ conn = getConnection();
System.out.println("Exception [20][confirmReceivables]" + sqlHdr + e.getMessage());
e.printStackTrace();
retString = e.getMessage();
return retString;
//added throws clause by Varsha V
throw new ITMException(e);
//return retString;
}
}
System.out.println("Ret String1: " + retString);
......
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