Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-08-10 03:12:50 -0400
committerIgor Fedorenko2014-08-14 13:43:09 -0400
commit7d834955b05db2177fed5c394cbb970ac07985c1 (patch)
treee5d6c125a191f55132e438644b07e5a7cd31081e
parent04bf245d5f031b0df8301e1f19297ca16ad4b8a5 (diff)
downloadm2e-core-7d834955b05db2177fed5c394cbb970ac07985c1.tar.gz
m2e-core-7d834955b05db2177fed5c394cbb970ac07985c1.tar.xz
m2e-core-7d834955b05db2177fed5c394cbb970ac07985c1.zip
more informative error marker for 'other' maven exceptions
Change-Id: I50c6a61c5ec592f483426cd150be4ae75a82837c Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
index 12844432..cffc8cfa 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
@@ -18,6 +18,8 @@ import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.base.Throwables;
+
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -156,15 +158,10 @@ public class MavenMarkerManager implements IMavenMarkerManager {
private String getErrorMessage(Throwable ex) {
StringBuilder message = new StringBuilder();
- while(ex != null) {
- if(ex.getMessage() != null && message.indexOf(ex.getMessage()) < 0) {
- if(message.length() > 0) {
- message.append(": ");
- }
- message.append(ex.getClass().getSimpleName()).append(": ").append(ex.getMessage());
- }
- ex = ex.getCause();
+ if(ex.getMessage() != null) {
+ message.append(ex.getMessage()).append("\n\n");
}
+ message.append(Throwables.getStackTraceAsString(ex));
return message.toString();
}

Back to the top