[pgsqlclient-checkins] pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient PgDbClient.cs,1.5
Status: Inactive
Brought to you by:
carlosga_fb
From: Carlos G. Á. <car...@us...> - 2005-04-04 18:16:13
|
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18971 Modified Files: PgDbClient.cs PgStatement.cs Log Message: 2005-04-03 Carlos Guzman Alvarez <car...@te...> * Changes to improve exception handling. Index: PgDbClient.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgDbClient.cs,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** PgDbClient.cs 13 Feb 2005 20:52:29 -0000 1.54 --- PgDbClient.cs 4 Apr 2005 18:15:57 -0000 1.55 *************** *** 355,362 **** throw new PgClientException(ex.Message); } ! catch (PgClientException ex) { this.Detach(); ! throw ex; } } --- 355,362 ---- throw new PgClientException(ex.Message); } ! catch (PgClientException) { this.Detach(); ! throw; } } *************** *** 376,382 **** throw new PgClientException(ex.Message); } ! catch (PgClientException ex) { ! throw ex; } } --- 376,382 ---- throw new PgClientException(ex.Message); } ! catch (PgClientException) { ! throw; } } *************** *** 408,414 **** this.send.Flush(); } ! catch (IOException ex) { ! throw ex; } } --- 408,414 ---- this.send.Flush(); } ! catch (IOException) { ! throw; } } *************** *** 435,439 **** this.Sync(); ! // Throe the PostgreSQL exception throw ex; --- 435,439 ---- this.Sync(); ! // Throw the PostgreSQL exception throw ex; *************** *** 473,479 **** responsePacket.Encoding = Settings.Encoding; } ! catch (IOException ex) { ! throw ex; } --- 473,479 ---- responsePacket.Encoding = Settings.Encoding; } ! catch (IOException) { ! throw; } *************** *** 725,731 **** this.SendPacket(packet, PgFrontEndCodes.FLUSH); } ! catch (Exception ex) { ! throw ex; } } --- 725,731 ---- this.SendPacket(packet, PgFrontEndCodes.FLUSH); } ! catch (Exception) { ! throw; } } *************** *** 760,764 **** } ! throw ex; } } --- 760,764 ---- } ! throw; } } *************** *** 781,787 **** this.SendSimplePacket(packet); } ! catch (Exception ex) { ! throw ex; } } --- 781,787 ---- this.SendSimplePacket(packet); } ! catch (Exception) { ! throw; } } *************** *** 817,823 **** } } ! catch (Exception ex) { ! throw ex; } } --- 817,823 ---- } } ! catch (Exception) { ! throw; } } *************** *** 908,912 **** if (this.sslStream != null) { ! this.sslStream.Close(); } if (this.networkStream != null) --- 908,918 ---- if (this.sslStream != null) { ! try ! { ! this.sslStream.Close(); ! } ! catch ! { ! } } if (this.networkStream != null) Index: PgStatement.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/NPgClient/PgStatement.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** PgStatement.cs 22 Oct 2004 18:54:05 -0000 1.28 --- PgStatement.cs 4 Apr 2005 18:15:58 -0000 1.29 *************** *** 206,215 **** this.status = PgStatementStatus.Parsed; } ! catch (PgClientException ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 206,215 ---- this.status = PgStatementStatus.Parsed; } ! catch (PgClientException) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 257,266 **** this.status = PgStatementStatus.Described; } ! catch (Exception ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 257,266 ---- this.status = PgStatementStatus.Described; } ! catch (Exception) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 308,317 **** this.status = PgStatementStatus.Parsed; } ! catch (Exception ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 308,317 ---- this.status = PgStatementStatus.Parsed; } ! catch (Exception) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 367,376 **** this.status = PgStatementStatus.Executed; } ! catch (Exception ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 367,376 ---- this.status = PgStatementStatus.Executed; } ! catch (Exception) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 419,428 **** this.status = PgStatementStatus.Executed; } ! catch (Exception ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 419,428 ---- this.status = PgStatementStatus.Executed; } ! catch (Exception) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 483,492 **** this.status = PgStatementStatus.Executed; } ! catch (Exception ex) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw ex; } } --- 483,492 ---- this.status = PgStatementStatus.Executed; } ! catch (Exception) { // Update status this.status = PgStatementStatus.Error; // Throw exception ! throw; } } *************** *** 571,575 **** this.status = PgStatementStatus.Initial; } ! catch (Exception ex) { // Update Status --- 571,575 ---- this.status = PgStatementStatus.Initial; } ! catch (Exception) { // Update Status *************** *** 577,581 **** // Throw exception ! throw ex; } } --- 577,581 ---- // Throw exception ! throw; } } *************** *** 615,621 **** return stmtPlan.ToString(); } ! catch (PgClientException ex) { ! throw ex; } } --- 615,621 ---- return stmtPlan.ToString(); } ! catch (PgClientException) { ! throw; } } |