private void checkCompileFailures(String templateFile, CompilationResult result) {
        List<Diagnostic<StringWrappingJavaFile>> diagnostics = result.getDiagnostics();

        if (debugEnabled) {
            if (diagnostics.isEmpty()) {
                System.err.println("No compile diagnostics for: " + templateFile);
            } else {
                System.err.println("---------------------------------------");
                System.err.println("Compile diagnostics for: " + templateFile);
                for (Diagnostic<StringWrappingJavaFile> diagnostic : diagnostics) {
                    System.err.println(diagnostic);
                    System.err.println();
                }
                System.err.println("---------------------------------------");
            }
        }

        if (!result.isSuccessful()) {
            throw new IllegalArgumentException("Unable to compile " + templateFile);
        }
    }
@return the size that each message takes up in bytes
jctools-channels/src/main/java/org/jctools/channels/mapping/Mapper.java