do not throw PCE in case of long execution (IDEA-CR-52056)

GitOrigin-RevId: c1316b4ee6db4baf5b599c432b74cd2acc607c01
This commit is contained in:
Sergey Simonchik
2019-09-05 10:58:56 +00:00
committed by intellij-monorepo-bot
parent 7540948e0c
commit 90e0f0d2be
@@ -15,6 +15,7 @@
*/
package com.intellij.execution.filters;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
@@ -122,8 +123,14 @@ public class RegexpFilter implements Filter, DumbAware {
@Override
public Result applyFilter(@NotNull String line, int entireLength) {
Matcher matcher = myPattern.matcher(StringUtil.newBombedCharSequence(line, 100));
if (!matcher.find()) {
return null;
try {
if (!matcher.find()) {
return null;
}
}
catch (ProcessCanceledException e) {
// PCE is caused by long execution. Produce no links in this case.
return null;
}
String filePath = matcher.group(FILE_STR);