void (@NotNull Function<String, String> lambda) { Map<String, String> map = new HashMap<>(); Throwable thrown = null; try { map.computeIfAbsent("a", lambda); } catch (Throwable t) { thrown = t; throw t; } finally { if (thrown != null) { // possible int x = 0; } } }