summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blasearch.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/blasearch.java b/blasearch.java
index 138b995..3ddeb5d 100644
--- a/blasearch.java
+++ b/blasearch.java
@@ -83,7 +83,7 @@ public class blasearch {
}
// Print results
- if(results != null){
+ if(results.size() > 0){
for(int i=0; i<2; i++){
if (i != 0) {
System.out.print(" | ");
@@ -91,7 +91,10 @@ public class blasearch {
int count = i + 1;
System.out.print("Result " + count + ": " + results.get(i));
}
- }
+ } else {
+ System.out.print("Error: no results.\n");
+ System.exit(1);
+ }
System.out.print("\n");
}