Skip to content
Snippets Groups Projects
Commit 60887793 authored by Camille Okubo's avatar Camille Okubo
Browse files
parents 2fbcdcdd dc9c53f7
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