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

jcambon
28.01.2009 bd458262d71f8a331082e8b4d00a2f47b0eaa3fd
Fix for Issue #3760 dsconfig exits abruptly when creating a component with a missing parent (cont'd).
Fix for Issue #3761 dsconfig exits abruptly when creating a component with the same name.

1 files modified
18 ■■■■ changed files
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 18 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -796,7 +796,13 @@
        throw new ClientException(LDAPResultCode.OTHER, msg);
      } catch (ManagedObjectAlreadyExistsException e) {
        Message msg = ERR_DSCFG_ERROR_CREATE_MOAEE.get(ufn);
        throw new ClientException(LDAPResultCode.ENTRY_ALREADY_EXISTS, msg);
        if (app.isInteractive()) {
          app.println();
          app.printVerboseMessage(msg);
          return MenuResult.cancel();
        } else {
          throw new ClientException(LDAPResultCode.ENTRY_ALREADY_EXISTS, msg);
        }
      }
    }
  }
@@ -1237,9 +1243,13 @@
    } catch (ManagedObjectNotFoundException e) {
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MONFE.get(pufn);
      app.println();
      app.printVerboseMessage(msg);
      return MenuResult.cancel();
      if (app.isInteractive()) {
        app.println();
        app.printVerboseMessage(msg);
        return MenuResult.cancel();
      } else {
        throw new ClientException(LDAPResultCode.NO_SUCH_OBJECT, msg);
      }
    }
    if (result.isQuit()) {