mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better failure diagnostic and logging
This commit is contained in:
@@ -186,6 +186,7 @@ public class IncProjectBuilder {
|
||||
if (cause instanceof PersistentEnumerator.CorruptedException ||
|
||||
cause instanceof MappingFailedException ||
|
||||
cause instanceof IOException) {
|
||||
LOG.info(e);
|
||||
myMessageDispatcher.processMessage(new CompilerMessage(
|
||||
"", BuildMessage.Kind.INFO,
|
||||
"Internal caches are corrupted or have outdated format, forcing project rebuild: " +
|
||||
@@ -204,6 +205,7 @@ public class IncProjectBuilder {
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG.info(e);
|
||||
// the reason for the build stop is unexpected internal error, report it
|
||||
myMessageDispatcher.processMessage(new CompilerMessage("", cause));
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.jps.incremental.messages;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -101,7 +102,7 @@ public class CompilerMessage extends BuildMessage {
|
||||
StringBuilder text = new StringBuilder();
|
||||
text.append("Error: ");
|
||||
final String msg = internalError.getMessage();
|
||||
if (msg != null) {
|
||||
if (!StringUtil.isEmptyOrSpaces(msg)) {
|
||||
text.append(msg);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user