logging for IDEA-94673

This commit is contained in:
anna
2012-11-09 21:05:55 +01:00
parent 81e071d07f
commit 2b896d14d8
@@ -34,7 +34,6 @@ import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.List;
@@ -144,7 +143,14 @@ public class ProblemsHolder {
String message;
if (reference instanceof EmptyResolveMessageProvider) {
String pattern = ((EmptyResolveMessageProvider)reference).getUnresolvedMessagePattern();
message = BundleBase.format(pattern, reference.getCanonicalText()); // avoid double formatting
try {
message = BundleBase.format(pattern, reference.getCanonicalText()); // avoid double formatting
}
catch (IllegalArgumentException ex) {
// unresolvedMessage provided by third-party reference contains wrong format string (e.g. {}), tolerate it
message = pattern;
LOG.info(pattern);
}
}
else {
message = CodeInsightBundle.message("error.cannot.resolve.default.message", reference.getCanonicalText());