From ca243c62efa2550a5c38f081139e06f623c0f93d Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Tue, 04 Sep 2007 23:02:20 +0000
Subject: [PATCH] Fix bug which was preventing detailed error reporting in dsconfig when a managed object cannot be decoded properly (due to missing properties, invalid syntax, etc).
---
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java | 6 +++---
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java | 2 +-
opendj-sdk/opends/src/messages/messages/admin.properties | 4 ++--
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java | 2 +-
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java | 2 +-
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/opendj-sdk/opends/src/messages/messages/admin.properties b/opendj-sdk/opends/src/messages/messages/admin.properties
index 5659aca..c9645c0 100644
--- a/opendj-sdk/opends/src/messages/messages/admin.properties
+++ b/opendj-sdk/opends/src/messages/messages/admin.properties
@@ -230,9 +230,9 @@
not be performed because a conflicting change has already occurred. There \
may be another client administration tool in use
SEVERE_ERR_MANAGED_OBJECT_DECODING_EXCEPTION_SINGLE_100=The %s could not \
- be decoded due to the following property exception: %s
+ be decoded due to the following reason: %s
SEVERE_ERR_MANAGED_OBJECT_DECODING_EXCEPTION_PLURAL_101=The %s could not \
- be decoded due to the following property exceptions: %s
+ be decoded due to the following reasons: %s
SEVERE_ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_EMPTY_102=Empty managed \
object names are not permitted
SEVERE_ERR_ILLEGAL_MANAGED_OBJECT_NAME_EXCEPTION_BLANK_103=Blank managed \
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
index 2206bf1..299cd9e 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -575,7 +575,7 @@
} catch (ManagedObjectDecodingException e) {
Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (CommunicationException e) {
Message msg = ERR_DSCFG_ERROR_CREATE_CE.get(d.getUserFriendlyName(), e
.getMessage());
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
index b628f5d..7abde48 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
@@ -217,7 +217,7 @@
} catch (ManagedObjectDecodingException e) {
Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (CommunicationException e) {
Message msg = ERR_DSCFG_ERROR_DELETE_CE.get(relation
.getUserFriendlyName(), e.getMessage());
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java
index 80b8ef9..5ca84e8 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java
@@ -235,7 +235,7 @@
throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
} catch (ManagedObjectDecodingException e) {
Message msg = ERR_DSCFG_ERROR_GET_CHILD_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (CommunicationException e) {
Message msg = ERR_DSCFG_ERROR_GET_CHILD_CE.get(ufn, e.getMessage());
throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java
index 63df154..fb4f43a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java
@@ -228,7 +228,7 @@
} catch (ManagedObjectDecodingException e) {
ufn = path.getManagedObjectDefinition().getUserFriendlyName();
Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (CommunicationException e) {
Message msg = ERR_DSCFG_ERROR_LIST_CE.get(ufn, e.getMessage());
throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
@@ -270,7 +270,7 @@
// FIXME: just output this as a warnings (incl. the name) but
// continue.
Message msg = ERR_DSCFG_ERROR_LIST_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (AuthorizationException e) {
Message msg = ERR_DSCFG_ERROR_LIST_AUTHZ.get(ufn);
throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS,
@@ -303,7 +303,7 @@
throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
} catch (ManagedObjectDecodingException e) {
Message msg = ERR_DSCFG_ERROR_LIST_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (ConcurrentModificationException e) {
Message msg = ERR_DSCFG_ERROR_LIST_CME.get(ufn);
throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
index 6e3bbd7..0ec55f8 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -328,7 +328,7 @@
// FIXME: should not abort here. Instead, display the errors (if
// verbose) and apply the changes to the partial managed object.
Message msg = ERR_DSCFG_ERROR_GET_CHILD_MODE.get(ufn);
- throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
+ throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
} catch (CommunicationException e) {
Message msg = ERR_DSCFG_ERROR_MODIFY_CE.get(ufn, e.getMessage());
throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
--
Gitblit v1.10.0