diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-06-09 13:11:11 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-06-09 13:11:11 +0200 |
commit | 6f9666c39113c88cb4389a86a82c78200ca7262d (patch) | |
tree | 5be185464faf8ec275a1c8184697e13bb44fcde3 /src | |
parent | 33ead46639087a4e772d6535d0354f39fadc5724 (diff) | |
download | lombok-6f9666c39113c88cb4389a86a82c78200ca7262d.tar.gz lombok-6f9666c39113c88cb4389a86a82c78200ca7262d.tar.bz2 lombok-6f9666c39113c88cb4389a86a82c78200ca7262d.zip |
added eclipse logging to the configsystem’s error reporter, and cleaned up the changelog slightly.
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); } }; |