Java 8 SAXParseException - 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 SAXParseException class.

This code example shows how to use the following methods: getColumnNumber, getLineNumber, getPublicId, getSystemId
            } 
 
            mySink.complete();
 
        } catch (SAXParseException e) {
            throw new OsmosisRuntimeException( 
                    "Unable to parse xml" 
                    + ".  publicId=(" + e.getPublicId()
                    + "), systemId=(" + e.getSystemId()
                    + "), lineNumber=" + e.getLineNumber()
                    + ", columnNumber=" + e.getColumnNumber() + ".",
                    e);
        } catch (SAXException e) {
            throw new OsmosisRuntimeException("Unable to parse XML.", e);
        } catch (IOException e) {
            throw new OsmosisRuntimeException("Unable to read XML.", e);
        } finally { 
            mySink.release();
 
            cleanup(); 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage, getColumnNumber, getLineNumber, getSystemId
 
  // ErrorHandler 
 
  @Override 
  public void warning(SAXParseException e) {
    log.warn("XML parse warning in \""+e.getSystemId()+"\", line "+e.getLineNumber()+", column "+e.getColumnNumber()+": "+e.getMessage());
  } 
 
  @Override 
  public void error(SAXParseException e) throws SAXException {
    throw e;
  } 
 
  @Override 
  public void fatalError(SAXParseException e) throws SAXException {
    throw e;
  } 
 
  // ErrorListener 
 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage, getColumnNumber, getLineNumber, getPublicId, getSystemId
     * @param ex  PARAM 
     * @return    Returns 
     */ 
    public String print( SAXParseException ex ) {
        StringBuffer sb = new StringBuffer();
        sb.append( "Exception: " + ex.getMessage() );
        sb.append( "failed at column : " + ex.getColumnNumber() +
                " on line " + ex.getLineNumber() );
        sb.append( "entity:\n" + ex.getPublicId() + "\n" + ex.getSystemId() );
        return sb.toString();
    } 
 
    /** 
     * Sets the textArea attribute of the ValidationHandler object 
     * 
     * @param jta  The new textArea value 
     */ 
    public void setTextArea( JTextArea jta ) {
        this.jta = jta;
    } 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getException, getMessage, getColumnNumber, getLineNumber, getPublicId
This code example shows how to use the following methods: getMessage, getLineNumber, getSystemId, toString
      xr.setDTDHandler(null);
      xr.parse(new InputSource(fileReader));
      visitor.close(null);
    } catch (SAXParseException e) {
      System.out.println("XML parsing error: " + "\n" +
          "Line:    " + e.getLineNumber() + "\n" +
          "URI:     " + e.getSystemId() + "\n" +
          "Message: " + e.getMessage());        
      visitor.close(e);
      throw new IOException(e.toString());
    } catch (SAXException e) {
      visitor.close(e);
      throw new IOException(e.toString());
    } catch (RuntimeException e) {
      visitor.close(e);
      throw e;
    } finally { 
      fileReader.close();
    } 
  } 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 SAXParseException Methods: