Java 8 functions to avoid try-catch repetition
First of all, Function&lt;Void, Void&gt; is not an appropriate choice of functional interface for this purpose.

Function&lt;T,R&gt; implementation should receive an instance of T and return an instance of R (although T and R still can be of same type).

If there is no incoming type, this looks like a Supplier.

If there is no returned type, it resembles a Consumer.

If there are no types to specify, Runnable can be used, but it'd better be kept for its initial concurrent usage.

So a dedicated functional interface can be created to solve the problem:

@FunctionalInterface
interface ExecutedWithFacesLogger {

  void executeWithFacesLogger();

}


Now, the execute method changes to the following:

protected void execute(ExecutedWithFacesLogger function) {
  try {
    function.executeWithFacesLogger();
    facesUtils.addInfoMessage("PROPERLY_SAVED");
  } catch (Exception ex) {
    facesUtils.addErrorMessage("ERROR");
    throw ex;
  }
}


And the caller is reduced to:

public void assignWorker() {
  execute(() -&gt; {
      assignWorker(selectedEquipment);
      reloadEquipmentById(selectedEquipment.get_Id());
  });
}