File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
main/java/org/springframework/bootstrap/cli
test/java/org/springframework/bootstrap/cli Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,9 @@ public int runAndHandleErrors(String... args) {
84
84
Set <BootstrapCliException .Option > options = NO_EXCEPTION_OPTIONS ;
85
85
if (ex instanceof BootstrapCliException ) {
86
86
options = ((BootstrapCliException ) ex ).getOptions ();
87
+ } else {
88
+ errorMessage (ex .getMessage ());
87
89
}
88
- errorMessage (ex .getMessage ());
89
90
if (options .contains (BootstrapCliException .Option .SHOW_USAGE )) {
90
91
showUsage ();
91
92
}
Original file line number Diff line number Diff line change @@ -124,8 +124,7 @@ public void handlesNoArgumentsException() throws Exception {
124
124
public void handlesNoSuchOptionException () throws Exception {
125
125
int status = this .cli .runAndHandleErrors ("--missing" );
126
126
assertThat (status , equalTo (1 ));
127
- assertThat (this .calls ,
128
- equalTo ((Set <Call >) EnumSet .of (Call .ERROR_MESSAGE , Call .SHOW_USAGE )));
127
+ assertThat (this .calls , equalTo ((Set <Call >) EnumSet .of (Call .SHOW_USAGE )));
129
128
}
130
129
131
130
@ Test
You can’t perform that action at this time.
0 commit comments