diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/core/configuration/ConfigurationProblemReporter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/lombok/core/configuration/ConfigurationProblemReporter.java b/src/core/lombok/core/configuration/ConfigurationProblemReporter.java index 5dbf99a8..ca0c8210 100644 --- a/src/core/lombok/core/configuration/ConfigurationProblemReporter.java +++ b/src/core/lombok/core/configuration/ConfigurationProblemReporter.java @@ -21,11 +21,20 @@ */ package lombok.core.configuration; +import lombok.eclipse.handlers.EclipseHandlerUtil; + public interface ConfigurationProblemReporter { void report(String sourceDescription, String problem, int lineNumber, CharSequence line); ConfigurationProblemReporter CONSOLE = new ConfigurationProblemReporter() { @Override public void report(String sourceDescription, String problem, int lineNumber, CharSequence line) { + try { + // The console (System.err) is non-existent in eclipse environments, so we should try to + // log into at least the error log. This isn't really the appropriate place (should go in the + // relevant file instead, most people never see anything in the error log either!), but at least + // there is a way to see it, vs. System.err, which is completely invisible. + EclipseHandlerUtil.warning(String.format("%s (%s:%d)", problem, sourceDescription, lineNumber), null); + } catch (Throwable ignore) {} System.err.printf("%s (%s:%d)\n", problem, sourceDescription, lineNumber); } }; |