Skip to content

Commit

Permalink
SchemaHandler.java: problems are reported with stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Sep 10, 2020
1 parent 2299c7e commit d489b03
Showing 1 changed file with 4 additions and 12 deletions.
Expand Up @@ -7,7 +7,6 @@
package com.evolveum.midpoint.prism.impl.schema;

import java.io.IOException;
import java.text.MessageFormat;

import org.xml.sax.*;

Expand Down Expand Up @@ -49,17 +48,10 @@ public void fatalError(SAXParseException e) throws SAXException {
}

private void print(String header, SAXParseException e) {
StringBuilder builder = new StringBuilder();
builder.append("Error occurred during schema parsing: ");
builder.append(header);
builder.append(" ");
builder.append(MessageFormat.format("on line {0} at {1}, {2}",
Integer.toString(e.getLineNumber()), e.getSystemId(), e.getPublicId()));
builder.append(" ");
builder.append(e.getMessage());

LOGGER.error(builder.toString());
LOGGER.trace(builder.toString(), e);
String error = "Error occurred during schema parsing: " + header + " "
+ "on line " + e.getLineNumber() + " at " + e.getSystemId() + ", " + e.getPublicId()
+ " " + e.getMessage();
LOGGER.error(error, e);
}

/*
Expand Down

0 comments on commit d489b03

Please sign in to comment.