Example usage for org.xml.sax SAXException SAXException

List of usage examples for org.xml.sax SAXException SAXException

Introduction

In this page you can find the example usage for org.xml.sax SAXException SAXException.

Prototype

public SAXException(Exception e) 

Source Link

Document

Create a new SAXException wrapping an existing exception.

Usage

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void notPermittedInElementContext(String[] en, String[] cn, Object xns) throws SAXException {
    assert en != null;
    assert cn != null;
    String s = "element " + formatExpandedName(en) + " not permitted in current element context "
            + formatExpandedName(cn);//from   w  ww.  j  av  a 2 s .  c om
    if (xns == null) {
        s += ", expected root context";
    } else if (xns instanceof String[][]) {
        int nxn = 0;
        s += ", expected one of { ";
        for (String[] xn : (String[][]) xns) {
            if (nxn++ > 0) {
                s += ", ";
            }
            s += formatExpandedName(xn);
        }
        s += " }";
    } else if (xns instanceof String[]) {
        s += ", expected " + formatExpandedName((String[]) xns);
    }
    throw new SAXException(formatLocator() + ": " + s);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void missingRequiredAttribute(String[] en, String name) throws SAXException {
    throw new SAXException(
            formatLocator() + ": element " + formatExpandedName(en) + " missing required attribute " + name);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void duplicateGlyph(String[] en, String name, int gid) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " contains duplicate name \"" + name + "\", with identifier value " + gid);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void unsupportedGlyph(String[] en, String name) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " refers to unsupported glyph id \"" + name + "\"");
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void duplicateCMAPCharacter(String[] en, int cid) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " contains duplicate cmap character code: " + CharUtilities.format(cid));
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void duplicateCMAPGlyph(String[] en, int gid) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " contains duplicate cmap glyph code: " + gid);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void duplicateGlyphClass(String[] en, String name, String glyphClass) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " contains duplicate glyph class for \"" + name + "\", with class value " + glyphClass);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void unsupportedFormat(String[] en, int format) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en)
            + " refers to unsupported table format \"" + format + "\"");
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void invalidIndex(String[] en, int actual, int expected) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en) + " specifies invalid index "
            + actual + ", expected " + expected);
}

From source file:org.apache.fop.complexscripts.fonts.ttx.TTXFile.java

private void mismatchedIndex(String[] en, String label, int actual, int expected) throws SAXException {
    throw new SAXException(formatLocator() + ": element " + formatExpandedName(en) + " mismatched " + label
            + " index: got " + actual + ", expected " + expected);
}