From e778e6f04a36e55cdb88ff8448eef804c487286b Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 04 Sep 2007 18:57:19 +0000
Subject: [PATCH] Improve content of CommunicationException when they contain only a cause.
---
opends/src/messages/messages/admin.properties | 2 ++
opends/src/server/org/opends/server/admin/client/CommunicationException.java | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/opends/src/messages/messages/admin.properties b/opends/src/messages/messages/admin.properties
index 6ab5d73..5659aca 100644
--- a/opends/src/messages/messages/admin.properties
+++ b/opends/src/messages/messages/admin.properties
@@ -253,3 +253,5 @@
properties are mandatory: %s
SEVERE_ERR_PROPERTY_NOT_FOUND_EXCEPTION_110=The property "%s" was not \
recognized
+SEVERE_ERR_COMMUNICATION_EXCEPTION_DEFAULT_CAUSE_111=A communication problem \
+ occurred while contacting the server: %s
diff --git a/opends/src/server/org/opends/server/admin/client/CommunicationException.java b/opends/src/server/org/opends/server/admin/client/CommunicationException.java
index 01564a6..f863dcf 100644
--- a/opends/src/server/org/opends/server/admin/client/CommunicationException.java
+++ b/opends/src/server/org/opends/server/admin/client/CommunicationException.java
@@ -68,7 +68,8 @@
* The cause.
*/
public CommunicationException(Throwable cause) {
- super(ERR_COMMUNICATION_EXCEPTION_DEFAULT.get(), cause);
+ super(ERR_COMMUNICATION_EXCEPTION_DEFAULT_CAUSE.get(cause.getMessage()),
+ cause);
}
--
Gitblit v1.10.0