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