private MarshalSAXParseException marshalSAXParseException(SAXParseException exception) {
   return new MarshalSAXParseException(
       exception.getLocalizedMessage(),
       exception.getPublicId(),
       exception.getSystemId(),
       exception.getLineNumber(),
       exception.getColumnNumber(),
       exception.getException(),
       marshalRecord.getOwningObject());
 }
 private void throwError(final SAXParseException e) {
   throw new Error(
       e.getLocalizedMessage()
           + "\n\nPublic ID: "
           + (e.getPublicId() == null ? "None" : e.getPublicId())
           + ", System ID: "
           + (e.getPublicId() == null ? "None" : e.getPublicId())
           + ",\nLine number: "
           + e.getLineNumber()
           + ", Column number: "
           + e.getColumnNumber());
 }
 @Override
 public void fatalError(SAXParseException e) throws SAXException {
   if (e.getLocalizedMessage().contains(UnrecoverableParseError.FAILUREMESSAGE)) {
     throw new UnrecoverableParseError(e);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.xml.sax.helpers.DefaultHandler#fatalError(org.xml.sax.SAXParseException)
  */
 @Override
 public void fatalError(final SAXParseException e) {
   this.fatals.add(e.getLocalizedMessage());
 }
Beispiel #5
0
 /** {@inheritDoc} */
 public void warning(SAXParseException e) {
   log.warn(e.getLocalizedMessage());
 }
 @Override
 public void warning(final SAXParseException e) throws SAXException {
   System.out.println("XML File Warning: " + e.getLocalizedMessage());
 }