summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java
index 62b78fd5..b8af6f51 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -376,14 +376,13 @@ public class OnapCli {
this.exitSuccessfully();
generateSmapleYaml(cmd);
+ } catch (OnapCommandWarning w) {
+ this.print(cmd.getResult().getDebugInfo());
+ this.exitSuccessfully();
} catch (Exception e) {
+ this.print(e);
this.print(cmd.getResult().getDebugInfo());
- if (e instanceof OnapCommandWarning) {
- this.exitSuccessfully();
- } else {
- this.print(e);
- this.exitFailure();
- }
+ this.exitFailure();
}
}
}