mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jcambon
05.40.2008 1c35783cec1e6444626b78b7978151ff5723e6ab
Fix for Issue #3644 : dsconfig failure without error message.

2 files modified
23 ■■■■ changed files
opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java 17 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 6 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/ArgumentExceptionFactory.java
@@ -623,6 +623,23 @@
  /**
   * Creates an argument exception which should be used when a child
   * component does not exist.
   *
   * @param componentName
   *          The component name.
   * @return Returns an argument exception.
   */
  public static ArgumentException unknownValueForChildComponent(
    String componentName) {
          Message msg = ERR_DSCFG_ERROR_FINDER_NO_CHILDREN.get(
            componentName);
    return new ArgumentException(msg);
  }
  /**
   * Creates a CLI exception which should be used when a managed
   * object is retrieved but does not have the correct type
   * appropriate for the associated sub-command.
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -701,10 +701,8 @@
      Message msg = ERR_DSCFG_ERROR_MODIFY_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (ManagedObjectNotFoundException e) {
      Message msg = ERR_DSCFG_ERROR_FINDER_NO_CHILDREN.get(ufn);
      app.println();
      app.printVerboseMessage(msg);
      return MenuResult.cancel();
      throw ArgumentExceptionFactory.unknownValueForChildComponent(
        "\"" + names.get(0) + "\"");
    }
    if (result.isQuit()) {