From 06b0a511fd8d009392b688d65c8a474cde500e65 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 30 Jul 2010 12:57:02 +0000
Subject: [PATCH] Improves error message printed when the client tools time out during the establishment of the connection.
---
opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
index 7fc1d41..690323f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -87,13 +87,13 @@
// The message ID counter to use for requests.
- private AtomicInteger nextMessageID;
+ private final AtomicInteger nextMessageID;
// The print stream to use for standard error.
- private PrintStream err;
+ private final PrintStream err;
// The print stream to use for standard output.
- private PrintStream out;
+ private final PrintStream out;
// Tells whether the command-line is being executed in script friendly mode
// or not.
@@ -225,7 +225,8 @@
}
if (!compareOptions.continueOnError())
{
- throw new IOException(ae.getMessage());
+ String message = LDAPToolUtils.getMessageForConnectionException(ae);
+ throw new IOException(message, ae);
}
else
{
@@ -991,7 +992,6 @@
connection.connectToHost(bindDNValue, bindPasswordValue, nextMessageID,
timeout);
-
ldapCompare = new LDAPCompare(nextMessageID, out, err);
ldapCompare.isScriptFriendly = scriptFriendlyArgument.isPresent();
if(fileNameValue == null && dnStrings.isEmpty())
--
Gitblit v1.10.0