aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-30 06:02:50 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-30 14:00:24 +0530
commitc51d7e1fd1c4500cae7a692ff68b37001db78fdd (patch)
tree6567aa24b415d843aa910393387228013353c06e /main/src
parent53caabc55566788a6fa0b8017621227efd5b0c06 (diff)
Normalize the error code in exceptions
CLI-2 Change-Id: I9d205993c9ca8fbf58459352fa023a2bf80ca376 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/cli/main/error/OnapCliArgumentValueMissing.java2
-rw-r--r--main/src/main/java/org/onap/cli/main/error/OnapCliInvalidArgument.java2
-rw-r--r--main/src/test/java/org/onap/cli/main/error/OnapCliArgumentTest.java6
3 files changed, 5 insertions, 5 deletions
diff --git a/main/src/main/java/org/onap/cli/main/error/OnapCliArgumentValueMissing.java b/main/src/main/java/org/onap/cli/main/error/OnapCliArgumentValueMissing.java
index f8f86e46..f1dd1ef7 100644
--- a/main/src/main/java/org/onap/cli/main/error/OnapCliArgumentValueMissing.java
+++ b/main/src/main/java/org/onap/cli/main/error/OnapCliArgumentValueMissing.java
@@ -27,6 +27,6 @@ public class OnapCliArgumentValueMissing extends OnapCommandException {
private static final long serialVersionUID = -6362824415803063442L;
public OnapCliArgumentValueMissing(String arg) {
- super("0x1001", "Value for argument " + arg + " is missing");
+ super("0x7001", "Value for argument " + arg + " is missing");
}
}
diff --git a/main/src/main/java/org/onap/cli/main/error/OnapCliInvalidArgument.java b/main/src/main/java/org/onap/cli/main/error/OnapCliInvalidArgument.java
index 32d8ef6f..e9f3adc5 100644
--- a/main/src/main/java/org/onap/cli/main/error/OnapCliInvalidArgument.java
+++ b/main/src/main/java/org/onap/cli/main/error/OnapCliInvalidArgument.java
@@ -25,7 +25,7 @@ import org.onap.cli.fw.error.OnapCommandException;
public class OnapCliInvalidArgument extends OnapCommandException {
private static final long serialVersionUID = -1438492553530993246L;
- private static final String ERROR_CODE = "0x1000";
+ private static final String ERROR_CODE = "0x7000";
private static final String ERROR_MESSAGE1 = "Invalid argument ";
public OnapCliInvalidArgument(String arg) {
diff --git a/main/src/test/java/org/onap/cli/main/error/OnapCliArgumentTest.java b/main/src/test/java/org/onap/cli/main/error/OnapCliArgumentTest.java
index 3916c630..fcb919b9 100644
--- a/main/src/test/java/org/onap/cli/main/error/OnapCliArgumentTest.java
+++ b/main/src/test/java/org/onap/cli/main/error/OnapCliArgumentTest.java
@@ -25,15 +25,15 @@ public class OnapCliArgumentTest {
@Test
public void onapCliArgumentValueMissingTest() {
OnapCliArgumentValueMissing failed = new OnapCliArgumentValueMissing("Argument value missing");
- assertEquals("0x1001::Value for argument Argument value missing is missing", failed.getMessage());
+ assertEquals("0x7001::Value for argument Argument value missing is missing", failed.getMessage());
}
@Test
public void onapCliInvalidArgumentTest() {
OnapCliInvalidArgument failed = new OnapCliInvalidArgument("Invalid Argument");
- assertEquals("0x1000::Invalid argument Invalid Argument", failed.getMessage());
+ assertEquals("0x7000::Invalid argument Invalid Argument", failed.getMessage());
failed = new OnapCliInvalidArgument("Invalid Argument", new Exception(""));
- assertEquals("0x1000::Invalid argument Invalid Argument , ", failed.getMessage());
+ assertEquals("0x7000::Invalid argument Invalid Argument , ", failed.getMessage());
}
}