summaryrefslogtreecommitdiff
path: root/src/main/FarmShell.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/FarmShell.java')
-rw-r--r--src/main/FarmShell.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/FarmShell.java b/src/main/FarmShell.java
index daab973..55585c2 100644
--- a/src/main/FarmShell.java
+++ b/src/main/FarmShell.java
@@ -1,6 +1,7 @@
package main;
import java.io.IOException;
+import java.sql.SQLException;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.Scanner;
@@ -81,6 +82,8 @@ public class FarmShell {
} catch (NoSuchElementException ex) {
// thrown by the "exit" command to signal exit
return false;
+ } catch (SQLException ex){
+ System.err.println("such SQLException");
}
// another satisfied customer, next!
return true;
@@ -131,7 +134,7 @@ public class FarmShell {
"Available commands:"
};
- private void execute(Command command, String[] params) throws IOException {
+ private void execute(Command command, String[] params) throws SQLException, IOException {
if (params.length < command.getParamCount()) {
throw new IllegalArgumentException("Expected "
+ command.getParamCount() + " parameters, got only "