From 60b1359b65d8505c32f0598bf325043b7cedf843 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Tue, 16 Dec 2014 17:05:29 +0000
Subject: [PATCH] OPENDJ-1655 (CR-5676) Fix display of error message in dsconfig
---
opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SetPropSubCommandHandler.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SetPropSubCommandHandler.java b/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SetPropSubCommandHandler.java
index 49462e5..3f87ad9 100644
--- a/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SetPropSubCommandHandler.java
+++ b/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/SetPropSubCommandHandler.java
@@ -308,9 +308,9 @@
if (app.isInteractive()) {
// If interactive, give the user the chance to fix the
// problems.
- app.println();
+ app.errPrintln();
displayMissingMandatoryPropertyException(app, e);
- app.println();
+ app.errPrintln();
if (!app.confirmAction(INFO_DSCFG_PROMPT_EDIT_AGAIN.get(ufn), true)) {
return MenuResult.cancel();
}
@@ -327,9 +327,9 @@
if (app.isInteractive()) {
// If interactive, give the user the chance to fix the
// problems.
- app.println();
+ app.errPrintln();
displayOperationRejectedException(app, e);
- app.println();
+ app.errPrintln();
if (!app.confirmAction(INFO_DSCFG_PROMPT_EDIT_AGAIN.get(ufn), true)) {
return MenuResult.cancel();
}
@@ -442,9 +442,9 @@
isBadReference = false;
} catch (MissingMandatoryPropertiesException e) {
// Give the user the chance to fix the problems.
- app.println();
+ app.errPrintln();
displayMissingMandatoryPropertyException(app, e);
- app.println();
+ app.errPrintln();
if (app.confirmAction(INFO_DSCFG_PROMPT_EDIT.get(rufn), true)) {
MenuResult<Void> result = modifyManagedObject(app, context, ref, handler);
if (result.isQuit()) {
@@ -460,9 +460,9 @@
throw new ClientException(ReturnCode.CONSTRAINT_VIOLATION, msg);
} catch (OperationRejectedException e) {
// Give the user the chance to fix the problems.
- app.println();
+ app.errPrintln();
displayOperationRejectedException(app, e);
- app.println();
+ app.errPrintln();
if (app.confirmAction(INFO_DSCFG_PROMPT_EDIT.get(rufn), true)) {
MenuResult<Void> result = modifyManagedObject(app, context, ref, handler);
if (result.isQuit()) {
@@ -497,9 +497,9 @@
// the user refused to modify it, then give the used the
// option of editing the referencing component.
if (isBadReference) {
- app.println();
- app.println(ERR_SET_REFERENCED_COMPONENT_DISABLED.get(ufn, rufn));
- app.println();
+ app.errPrintln();
+ app.errPrintln(ERR_SET_REFERENCED_COMPONENT_DISABLED.get(ufn, rufn));
+ app.errPrintln();
if (app.confirmAction(INFO_DSCFG_PROMPT_EDIT_AGAIN.get(ufn), true)) {
return MenuResult.again();
} else {
@@ -655,8 +655,8 @@
except = ArgumentExceptionFactory.unknownValueForChildComponent("\"" + objName + "\"");
}
if (app.isInteractive()) {
- app.println();
- app.printVerboseMessage(except.getMessageObject());
+ app.errPrintln();
+ app.errPrintln(except.getMessageObject());
return MenuResult.cancel();
} else {
throw except;
--
Gitblit v1.10.0