Skip to content

Commit

Permalink
changed logging time. removed jars from compiled jar. added additiona…
Browse files Browse the repository at this point in the history
…l checks for CLI
  • Loading branch information
lukethompsxn committed Aug 19, 2018
1 parent 40cd45a commit a33977d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jar {

into 'res', {
from 'res'
exclude 'extlibs/'
}

into 'licenses', {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/se306/a1/scheduler/util/parse/CLIParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public InputConfig parseCLI(String[] args) throws ParseException, CLIException {

if (isInteger(stringCores)) {
config.cores = Integer.parseInt(stringCores);
if (config.cores < 1) {
throw new CLIException("Number of cores specified cannot be less than 1");
}
logger.info("Has specified parallel option: number of cores = " + config.cores);
} else {
logger.error("Number of cores is not an integer");
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/se306/a1/scheduler/util/parse/GraphParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public static Graph parse(String inputPath) throws IOException, GraphException {
Map<String, Node> nodes = new HashMap<>();
List<Edge> edges = new ArrayList<>();

if (parsedNodes.values().isEmpty()) {
throw new GraphException("No nodes contained in the graph");
}

for (GraphNode node : parsedNodes.values()) {
String label = node.getId();

Expand Down

0 comments on commit a33977d

Please sign in to comment.