Skip to content

Commit

Permalink
Ignore XMLParserException to fix eclipse#416
Browse files Browse the repository at this point in the history
Ignore XMLParserException to fix eclipse#416

Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr authored and fbricon committed Jun 5, 2019
1 parent 46984c2 commit 636bdcf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.xerces.xni.grammars.XMLGrammarDescription;
import org.apache.xerces.xni.parser.XMLEntityResolver;
import org.apache.xerces.xni.parser.XMLInputSource;
import org.apache.xerces.xni.parser.XMLParseException;
import org.eclipse.lsp4j.Diagnostic;
import org.eclipse.lsp4j.jsonrpc.CancelChecker;
import org.eclipse.lsp4xml.dom.DOMDocument;
Expand Down Expand Up @@ -87,10 +88,10 @@ public static void doDiagnostics(DOMDocument document, XMLEntityResolver entityR
XMLInputSource is = new XMLInputSource(null, uri, uri, inputStream, null);
grammarPreparser.getLoader(XMLGrammarDescription.XML_SCHEMA);
grammarPreparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, is);
} catch (IOException | CancellationException exception) {
} catch (IOException | CancellationException | XMLParseException exception) {
// ignore error
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Unexpected XMLValidator error", e);
LOGGER.log(Level.SEVERE, "Unexpected XSDValidator error", e);
}
}

Expand Down

0 comments on commit 636bdcf

Please sign in to comment.