ErrorHandler error - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ErrorHandler error method.

This code example shows how to use the following methods:error
  public void error(SAXParseException e)
    throws SAXException 
  { 
    if (errorHandler != null)
      { 
        errorHandler.error(e);
      } 
  } 
 
  public void fatalError(SAXParseException e)
    throws SAXException 
  { 
    if (errorHandler != null)
      { 
        errorHandler.fatalError(e);
      } 
    abort(); 
  } 
 
} 
5
CodeRank
This code example shows how to use the following methods:
     * @param string 
     * @throws SAXException 
     */ 
    private void err(String message) throws SAXException {
        if (errorHandler != null) {
          SAXParseException spe = new SAXParseException(message, this);
          errorHandler.error(spe);
        } 
    } 
 
    /** 
     * @param string 
     * @throws SAXException 
     */ 
    private void warn(String message) throws SAXException {
        if (errorHandler != null) {
          SAXParseException spe = new SAXParseException(message, this);
          errorHandler.warning(spe);
        } 
    } 
5
CodeRank
This code example shows how to use the following methods:
     * @param message the error message 
     * @throws SAXException if something goes wrong 
     */ 
    public void err(String message) throws SAXException {
        if (errorHandler != null) {
            SAXParseException spe = new SAXParseException(message, locator);
            errorHandler.error(spe);
        } 
    } 
 
    /** 
     * Returns <code>true</code> if the argument is a composing BMP character  
     * or a surrogate and <code>false</code> otherwise. 
     *  
     * @param c a UTF-16 code unit 
     * @return <code>true</code> if the argument is a composing BMP character  
     * or a surrogate and <code>false</code> otherwise 
     */ 
    private static boolean isComposingCharOrSurrogate(char c) {
        if (UCharacter.isHighSurrogate(c) || UCharacter.isLowSurrogate(c)) {
5
CodeRank
This code example shows how to use the following methods:
     */ 
    private void err(String message) throws IOException {
        // TODO remove wrapping when changing read() to take a CharBuffer 
        try { 
            if (errorHandler != null) {
                SAXParseException spe = new SAXParseException(message, this);
                errorHandler.error(spe);
            } 
        } catch (SAXException e) {
            throw (IOException) new IOException(e.getMessage()).initCause(e);
        } 
    } 
 
    public Charset getCharset() {
        return decoder.charset();
    } 
 
    /** 
     * @see java.io.Reader#read() 
     */ 
5
CodeRank
This code example shows how to use the following methods:error
    } 
 
    /** {@inheritDoc} */ 
    public void error(SAXParseException exception) throws SAXException {
        if (errorHandler != null) {
            errorHandler.error(exception);
        } 
    } 
 
    /** {@inheritDoc} */ 
    public void fatalError(SAXParseException exception) throws SAXException {
        if (errorHandler != null) {
            errorHandler.fatalError(exception);
        } 
    } 
 
} 
3
CodeRank
This code example shows how to use the following methods:error
     */ 
    public void error (String message, ParserException e)
    { 
        try 
        { 
            mErrorHandler.error (
                new SAXParseException (message, mLocator, e));
        } 
        catch (SAXException se)
        { 
            se.printStackTrace ();
        } 
    } 
} 
3
CodeRank
This code example shows how to use the following methods:error
 
        public void error(SAXParseException exception) throws SAXException {
            if(null == errorHandler) {
                throw exception;
            } 
            errorHandler.error(marshalSAXParseException(exception));
        } 
 
        public void fatalError(SAXParseException exception) throws SAXException {
            if(null == errorHandler) {
                throw exception;
            } 
            errorHandler.fatalError(marshalSAXParseException(exception));
        } 
 
        private MarshalSAXParseException marshalSAXParseException(SAXParseException exception) {
            return new MarshalSAXParseException(exception.getLocalizedMessage(), exception.getPublicId(), exception.getSystemId(), exception.getLineNumber(), exception.getColumnNumber(), exception.getException(), marshalRecord.getOwningObject());
        } 
 
    } 
3
CodeRank
This code example shows how to use the following methods:error
    } 
 
    private final void malformedContentTypeError(String contentType, String reason)
        throws SAXException {
        if (errorHandler != null) {
            errorHandler.error(new SAXParseException(
                    "Document served with malformed Content-Type header: " 
                    + "  \u201c" + contentType + "\u201d. "
                    + reason,
                    null, null, -1, -1)); 
        } 
    } 
 
    private final ErrorHandler errorHandler;
 
    private boolean laxContentType;
 
    private boolean allowRnc = false;
 
    private boolean allowHtml = false;
3
CodeRank
This code example shows how to use the following methods:error
    private void err(String message) throws IOException {
        // TODO remove wrapping when changing read() to take a CharBuffer 
        try { 
            if (errorHandler != null) {
                SAXParseException spe = new SAXParseException(message, this);
                errorHandler.error(spe);
            } 
        } catch (SAXException e) {
            throw (IOException) new IOException(e.getMessage()).initCause(e);
        } 
    } 
 
    private void warn(String message) throws IOException {
        // TODO remove wrapping when changing read() to take a CharBuffer 
        try { 
            if (errorHandler != null) {
                SAXParseException spe = new SAXParseException(message, this);
                errorHandler.warning(spe);
            } 
        } catch (SAXException e) {
3
CodeRank
This code example shows how to use the following methods:error
error Method Overview
Receive notification of a recoverable error.
See Code Examples for other Java 8 ErrorHandler Methods: