|
|
|
|
@ -61,10 +61,15 @@ public class Main {
|
|
|
|
|
public void delWatchStock(String target) {
|
|
|
|
|
//XXX Concurrency not ready
|
|
|
|
|
// Should add runnable to executor
|
|
|
|
|
boolean success = true;
|
|
|
|
|
try {
|
|
|
|
|
mainList.delStock(target);
|
|
|
|
|
success = true;
|
|
|
|
|
} catch (StockNotExistsException e) {
|
|
|
|
|
System.out.println("Stock: " + target + " doesn't exists");
|
|
|
|
|
success = false;
|
|
|
|
|
} finally {
|
|
|
|
|
System.out.println(success ? "Deleted: " + target : "Failed to delete: " + target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|