mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: no need to wrap exception
This commit is contained in:
@@ -31,7 +31,6 @@ import com.intellij.structuralsearch.plugin.ui.Configuration;
|
||||
import com.intellij.structuralsearch.plugin.ui.ConfigurationManager;
|
||||
import com.intellij.structuralsearch.plugin.util.CollectingMatchResultSink;
|
||||
import com.intellij.structuralsearch.plugin.util.DuplicateFilteringResultSink;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.PairProcessor;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.indexing.FileBasedIndex;
|
||||
@@ -317,11 +316,11 @@ public class Matcher {
|
||||
* @throws UnsupportedPatternException
|
||||
*/
|
||||
public List<MatchResult> testFindMatches(String source,
|
||||
MatchOptions options,
|
||||
boolean fileContext,
|
||||
FileType sourceFileType,
|
||||
String sourceExtension,
|
||||
boolean physicalSourceFile)
|
||||
MatchOptions options,
|
||||
boolean fileContext,
|
||||
FileType sourceFileType,
|
||||
String sourceExtension,
|
||||
boolean physicalSourceFile)
|
||||
throws MalformedPatternException, UnsupportedPatternException {
|
||||
|
||||
CollectingMatchResultSink sink = new CollectingMatchResultSink();
|
||||
@@ -335,11 +334,6 @@ public class Matcher {
|
||||
|
||||
options.setScope(new LocalSearchScope(elements));
|
||||
testFindMatches(sink, options);
|
||||
}
|
||||
catch (IncorrectOperationException e) {
|
||||
MalformedPatternException exception = new MalformedPatternException();
|
||||
exception.initCause(e);
|
||||
throw exception;
|
||||
} finally {
|
||||
options.setScope(null);
|
||||
}
|
||||
|
||||
+3
@@ -135,6 +135,9 @@ public class Replacer {
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IncorrectOperationException(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user