@Override
    public void visitErrorElement(@NotNull PsiErrorElement element) {
      super.visitErrorElement(element);
      if (shouldShowProblem(element)) {
        throw new MalformedPatternException(element);
      }
    }
@Override
    public void visitErrorElement(@NotNull PsiErrorElement element)