Skip to content
Snippets Groups Projects
Commit dc9c53f7 authored by Gabriel Mille's avatar Gabriel Mille
Browse files

correction new input

parent 1730af74
Branches
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ public class Input {
}
public void newInput() {
public void newInput() throws IOException {
BufferedReader in= new BufferedReader( new InputStreamReader(System.in));
do {
......@@ -36,14 +36,17 @@ public class Input {
setInput(in.readLine());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.err.println(e.getMessage() + ": Contact support");
}
} catch (InvalidInputException e) {
Display.newPrintln(e.getMessage());
Display.newPrintln(e.getMessage());
} catch (Exception e) {
System.err.println(e.getMessage()+": Contact support");
} finally {
in.close();
}
}
while (!validInput());
}
public Input() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment