/** * The failed method is called on plan failure/abort. */ @PlanFailed public void failed() { }
/** * Called when plan fails. */ @PlanFailed public void failed() { System.out.println("Plan failed."); } }
/** * Called when plan fails. */ @PlanFailed public void failed(Exception e) { System.out.println("Plan failed: "+e); } }
@PlanAborted @PlanFailed public void failure(Exception e) { // goal.getDisaster().setProperty("active", false); // System.out.println("aborted: "+this+" "+goal.getDisaster()); // e.printStackTrace(); } }
/** * Called when a plan fails. */ @PlanFailed @PlanAborted public void failed(Exception e) { // System.out.println("Plan failed for: "+goal+" "+e); // e.printStackTrace(); } }
@PlanFailed protected IFuture<Void> failed(HelloGoal goal) { System.out.println("Failed: "+HelloWorldPlan.this+" "+goal.getText()); return IFuture.DONE; }
@PlanFailed protected IFuture<Void> failed(HelloGoal goal) { System.out.println("Failed: "+HelloWorldPlan.this+" "+goal.getText()); return IFuture.DONE; }
@PlanAborted @PlanFailed public void aborted(Exception e) { // System.out.println("aborted: "+e+" "+this); // e.printStackTrace(); }
@PlanAborted @PlanFailed public void fail(Exception ex) { System.out.println("failed: "+ex); }
/** * Called when a plan fails. */ @PlanFailed @PlanAborted public void failed(Exception e) { // System.out.println("Plan failed: "+this); // e.printStackTrace(); } }
@PlanAborted @PlanFailed @PlanPassed public void end() { System.out.println("plan end"); }
/** * Cleanup, when the user "pressed the button". */ @PlanAborted @PlanFailed public void aborted() { if(player!=null) { player.close(); } }
/** * The plan failure code. */ @PlanFailed public void failed(IPlan plan) { assert board.getLastMove().equals(move): "Tries to takeback wrong move."; depth--; print("Failed "+move, depth); board.takeback(); if(delay>0) { plan.waitFor(delay).get(); } }
/** * The plan failure code. */ @PlanFailed public IFuture<Void> failed(IPlan plan) { assert board.getLastMove().equals(move): "Tries to takeback wrong move."; Future<Void> ret = new Future<Void>(); depth--; print("Failed "+move, depth); board.takeback(); if(delay>0) { plan.waitFor(delay).addResultListener(new DelegationResultListener<Void>(ret)); } else { ret.setResult(null); } return ret; }