void (Reverter r) { try { List<String> errors = r.checkCanRevert(); if (!errors.isEmpty()) { showError(message("message.cannot.revert.because", formatErrors(errors))); return; } r.revert(); showNotification(r.getCommandName()); } catch (Exception e) { showError(message("message.error.during.revert", e)); } }