Search in sources :

Example 1 with ErrorReportSubmitter

use of com.intellij.openapi.diagnostic.ErrorReportSubmitter in project intellij-community by JetBrains.

the class DefaultIdeaErrorLogger method canHandle.

@Override
public boolean canHandle(IdeaLoggingEvent event) {
    if (ourLoggerBroken)
        return false;
    try {
        UpdateChecker.checkForUpdate(event);
        boolean notificationEnabled = !DISABLED_VALUE.equals(System.getProperty(FATAL_ERROR_NOTIFICATION_PROPERTY, ENABLED_VALUE));
        ErrorReportSubmitter submitter = IdeErrorsDialog.getSubmitter(event.getThrowable());
        boolean showPluginError = !(submitter instanceof ITNReporter) || ((ITNReporter) submitter).showErrorInRelease(event);
        //noinspection ThrowableResultOfMethodCallIgnored
        return notificationEnabled || showPluginError || ApplicationManagerEx.getApplicationEx().isInternal() || getOOMErrorKind(event.getThrowable()) != null || event.getThrowable() instanceof MappingFailedException;
    } catch (LinkageError e) {
        if (e.getMessage().contains("Could not initialize class com.intellij.diagnostic.IdeErrorsDialog")) {
            ourLoggerBroken = true;
        }
        throw e;
    }
}
Also used : ErrorReportSubmitter(com.intellij.openapi.diagnostic.ErrorReportSubmitter) MappingFailedException(com.intellij.util.io.MappingFailedException)

Aggregations

ErrorReportSubmitter (com.intellij.openapi.diagnostic.ErrorReportSubmitter)1 MappingFailedException (com.intellij.util.io.MappingFailedException)1