Java 8 ErrorHandler - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ErrorHandler class.

This code example shows how to use the following methods:fatalError
			} 
			catch (IOException ex) {
				SAXParseException saxException = new SAXParseException(ex.getMessage(), null, null, -1, -1, ex);
				ErrorHandler errorHandler = getErrorHandler();
				if (errorHandler != null) {
					errorHandler.fatalError(saxException);
				} 
				else { 
					throw saxException;
				} 
			} 
		} 
	} 
 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
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
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
     * @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);
        } 
    } 
     
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
        } 
    } 
 
    public void err(String message) throws SAXException {
        if (errorHandler != null) {
            errorHandler.error(new SAXParseException(message, publicId,
                    systemId, lineNumber, columnNumber));
        } 
    } 
 
    /** 
     * Emit errors if this cell and the argument overlap horizontally. 
     * @param laterCell another cell 
     * @throws SAXException if the <code>ErrorHandler</code> throws 
     */ 
    public void errOnHorizontalOverlap(Cell laterCell) throws SAXException {
        if (!((laterCell.right <= left) || (right <= laterCell.left))) {
            this.err("Table cell is overlapped by later table cell.");
            laterCell.err("Table cell overlaps an earlier table cell.");
        } 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
        errorHandler.fatalError(spe);
        throw spe;
    } 
    protected void err(String message) throws SAXException {
        SAXParseException spe = new SAXParseException(message, locator);
        errorHandler.error(spe);
    } 
    /** 
     * Returns the contentHandler. 
     *  
     * @return the contentHandler 
     */ 
    public ContentHandler getContentHandler() {
        return contentHandler;
    } 
    /** 
     * Sets the contentHandler. 
     *  
     * @param contentHandler the contentHandler to set 
     */ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
  public DTDHandler getDTDHandler() {
    return null; 
  } 
 
  private void error(String key, String arg) throws SAXException {
    eh.error(new SAXParseException(localizer.message(key, arg), locator));
  } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
 
            SAXParseException newEx = new SAXParseException(ex.getMessage(),
                    locator);
 
            if (errorHandler != null) {
                errorHandler.error(newEx);
            } 
 
            throw newEx;
        } 
 
        return document;
    } 
 
    /** 
     * Implements the whole parsing of the XML document. The XML pull parser is 
     * actually more of a tokenizer, and we are doing a classical recursive 
     * descent parsing (the method invokes itself for XML elements). Our 
     * approach to parsing does accept some illegal documents (more than one 
     * root element, for example). The assumption is that the DOM implementation 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
     * @throws SAXException if something goes wrong 
     */ 
    public void err(String message, Locator overrideLocator) throws SAXException {
        if (errorHandler != null) {
            SAXParseException spe = new SAXParseException(message, overrideLocator);
            errorHandler.error(spe);
        } 
    } 
     
    /** 
     * Emit an error. The locator is used. 
     *  
     * @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);
        } 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:error
      contentHandler.ignorableWhitespace(ch, start, len);
  } 
 
  private void check(boolean ok) throws SAXException {
    if (!ok)
      actualErrorHandler.error(new SAXParseException(matcher.getErrorMessage(), locator));
  } 
 
  public void setContentHandler(ContentHandler delegate) {
    this.contentHandler = delegate;
  } 
 
  public ContentHandler getContentHandler() {
    return contentHandler;
  } 
 
  public void setDTDHandler(DTDHandler dtdHandler) {
    this.dtdHandler = dtdHandler;
  } 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
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 ();
        } 
    } 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Java 8 ErrorHandler Questions & Answers:

See Code Examples for Java 8 ErrorHandler Methods: