ProcessingLog.initialize(getClass().getSimpleName()); } catch (@Nonnull IllegalArgumentException exception) { Log.error("The logging configuration is invalid:", exception); } catch (@Nonnull FileNotFoundException exception) { Log.error("Could not find the logging file:", exception); Log.error("The compilation failed due to the following problem:", throwable); ProcessingLog.error("An unexpected compilation error occurred: $. Please consult the log file under target/processor-logs/GeneratorProcessor.log for details.", Throwables.getSummary(throwable)); throw throwable;
} catch (@Nonnull FailedClassGenerationException exception) { ProcessingLog.error("The type $ is NOT generatable:", exception.getSourcePosition(), typeInformation == null ? typeElement : typeInformation, exception.getMessage()); Log.error("The compilation failed due to the following problem:", exception);
/** * Writes the generated file to the file system and returns whether it was successful. */ @Impure @NonWrittenRecipient public final boolean write() { requireNotWritten(); try { writeOnce(); } catch (@Nonnull IOException exception) { ProcessingLog.error("A problem occurred while generating the file $.", getName()); Log.error("Problem:", exception); return false; } ProcessingLog.information("Generated the file $.", getName()); this.written = true; return true; }