- Map<String, Object> data = new HashMap<String, Object>();
- data.put("delay", REPING_MINIMUM_DELAY / 60 / 1000);
- data.put("data", new Date(lastExecution.getTime() + REPING_MINIMUM_DELAY));
- throw new GigiApiException(new Scope(new SprintfCommand("Reping is only allowed after {0} minutes, yours end at {1}.", Arrays.asList("${delay}", "${data}")), data));
+ throw new GigiApiException(SprintfCommand.createSimple("Reping is only allowed after {0} minutes, yours end at {1}.", REPING_MINIMUM_DELAY / 60 / 1000, new Date(lastExecution.getTime() + REPING_MINIMUM_DELAY)));