default <R extends RuntimeException> void
		release(final Function<? super E, ? extends R> mapper) throws R {
			try {
				close();
			} catch (Exception e) {
				@SuppressWarnings("unchecked")
				final var error = (E)e;
				throw mapper.apply(error);
			}
		}
Calls the {@link #close()} method and wraps thrown {@link Exception}
into an {@link RuntimeException}, mapped by the given {@code mapper}.

@throws RuntimeException if the {@link #close()} method throws
        an {@link Exception}
jenetics/src/main/java/io/jenetics/internal/util/Lifecycle.java