private Callable<Void> createItemLoader(final String identifier, final AudioLoadResultHandler resultHandler) { return () -> { boolean[] reported = new boolean[1]; try { if (!checkSourcesForItem(new AudioReference(identifier, null), resultHandler, reported)) { log.debug("No matches for track with identifier {}.", identifier); resultHandler.noMatches(); } } catch (Throwable throwable) { if (reported[0]) { log.warn("Load result handler for {} threw an exception", identifier, throwable); } else { dispatchItemLoadFailure(identifier, resultHandler, throwable); } ExceptionTools.rethrowErrors(throwable); } return null; }; }