Skip to content

Commit

Permalink
SAXParseException in the language server trace when editing an .rng file
Browse files Browse the repository at this point in the history
Fixes #1441

Signed-off-by: azerr <azerr@redhat.com>
  • Loading branch information
azerr authored and datho7561 committed Jan 13, 2023
1 parent 8948c15 commit 0775aa4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@
import org.eclipse.lsp4j.Diagnostic;
import org.eclipse.lsp4j.jsonrpc.CancelChecker;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

import com.thaiopensource.relaxng.pattern.MySchemaPatternBuilder;
import com.thaiopensource.validate.IncorrectSchemaException;
Expand Down Expand Up @@ -61,7 +62,8 @@ public static void doDiagnostics(DOMDocument document, XMLEntityResolver entityR
XMLReaderCreator creator = new RNGXMLReaderCreator(reporterForRNG);
SchemaProvider.loadSchema(input, entityResolver, reporterForRNG,
new MySchemaPatternBuilder(), creator);
} catch (IOException | CancellationException | XMLParseException | IncorrectSchemaException exception ) {
} catch (IOException | SAXException | CancellationException | XMLParseException
| IncorrectSchemaException exception) {
// ignore error
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Unexpected RNG Validator error", e);
Expand Down

0 comments on commit 0775aa4

Please sign in to comment.