db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r179832 - /incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
Date Fri, 03 Jun 2005 16:42:28 GMT
Author: bandaram
Date: Fri Jun  3 09:42:26 2005
New Revision: 179832

URL: http://svn.apache.org/viewcvs?rev=179832&view=rev
Log:
Change Derby client to throw DisconnectException in netAgent.java.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)

Modified:
    incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java

Modified: incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java?rev=179832&r1=179831&r2=179832&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java (original)
+++ incubator/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java Fri Jun
 3 09:42:26 2005
@@ -104,14 +104,13 @@
         port_ = port;
         netConnection_ = netConnection;
         if (server_ == null) {
-            throw new SqlException(logWriter_, "Required property \"serverName\" not set");
+            throw new DisconnectException(this, "Required property \"serverName\" not set");
         }
 
         try {
             socket_ = (java.net.Socket) java.security.AccessController.doPrivileged(new OpenSocketAction(server,
port));
         } catch (java.security.PrivilegedActionException e) {
-            throw new SqlException(logWriter_,
-                    e.getException(),
+            throw new DisconnectException(this,
                     e.getClass().getName() + " : Error opening socket to server " + server
+ " on port " + port + " with message : " + e.getMessage());
         }
 
@@ -127,7 +126,7 @@
                 socket_.close();
             } catch (java.io.IOException doNothing) {
             }
-            exceptionOpeningSocket_ = new SqlException(logWriter_, e,
+            exceptionOpeningSocket_ = new DisconnectException(this,
                     "SocketException '" + e.getMessage() + "'");
         }
 
@@ -141,7 +140,7 @@
                 socket_.close();
             } catch (java.io.IOException doNothing) {
             }
-            exceptionOpeningSocket_ = new SqlException(logWriter_, e, "unable to open stream
on socket");
+            exceptionOpeningSocket_ = new DisconnectException(this, "unable to open stream
on socket '"+e.getMessage() + "'");
         }
 
         sourceCcsidManager_ = new EbcdicCcsidManager(); // delete these



Mime
View raw message