code: public void error(TransformerException exception) throws TransformerException
    {
      // If the m_throwExceptionOnError flag is true, rethrow the exception.
      // Otherwise report the error to System.err.
      if (m_throwExceptionOnError)
        throw exception;
      else
      {
        PrintWriter pw = getErrorWriter();
  
        printLocation(pw, exception);
        pw.println(exception.getMessage());
      }
    }
docs: Receive notification of a recoverable error.
  
  <p>This corresponds to the definition of "error" in section 1.2
  of the W3C XML 1.0 Recommendation.  For example, a validating
  parser would use this callback to report the violation of a
  validity constraint.  The default behaviour is to take no
  action.</p>
  
  <p>The SAX parser must continue to provide normal parsing events
  after invoking this method: it should still be possible for the
  application to process the document through to the end.  If the
  application cannot do so, then the parser should report a fatal
  error even if the XML 1.0 recommendation does not require it to
  do so.</p>
  
  @param exception The error information encapsulated in a
  SAX parse exception.
  @throws javax.xml.transform.TransformerException Any SAX exception, possibly
  wrapping another exception.
  @see javax.xml.transform.TransformerException