@@ -119,12 +119,15 @@ public class Shell implements CommandRegistry {
|
||||
*/
|
||||
public void run(InputProvider inputProvider) throws IOException {
|
||||
Object result = null;
|
||||
while (!(result instanceof ExitRequest)) {
|
||||
while (!(result instanceof ExitRequest)) { // Handles ExitRequest thrown from Quit command
|
||||
Input input;
|
||||
try {
|
||||
input = inputProvider.readInput();
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof ExitRequest) { // Handles ExitRequest thrown from hitting CTRL-C
|
||||
break;
|
||||
}
|
||||
resultHandler.handleResult(e);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.shell</groupId>
|
||||
<artifactId>spring-shell-parent</artifactId>
|
||||
<version>2.0.0.BUILD-SNAPSHOT</version>
|
||||
<version>2.0.1.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<description>Examples of using Spring Shell 2</description>
|
||||
|
||||
Reference in New Issue
Block a user