Package com.microstar.xml

Examples of com.microstar.xml.XmlException


            if (ex instanceof XmlException) {
                throw (XmlException) ex;
            } else {
                String msg = "XML element \"" + elementName
                        + "\" triggers exception:\n  " + ex.toString();
                throw new XmlException(msg, _currentExternalEntity(), _parser
                        .getLineNumber(), _parser.getColumnNumber());
            }
        }

        // NOTE: if super is called, this gets done three times...
View Full Code Here


                System.err.println(ex.toString());
                ex.printStackTrace();

                String msg = "XML element \"" + elementName
                        + "\" triggers exception:\n  " + ex.toString();
                throw new XmlException(msg, _currentExternalEntity(), _parser
                        .getLineNumber(), _parser.getColumnNumber());
            }
        }

        // NOTE: if super is called, this gets done twice.
View Full Code Here

                parser.parse(base, bin);
            } catch (Exception ex) {
                String msg;

                if (ex instanceof XmlException) {
                    XmlException xmlex = (XmlException) ex;
                    msg = "PlotMLFrame: failed to parse PlotML data:\n"
                            + "line: " + xmlex.getLine() + ", column: "
                            + xmlex.getColumn() + "\nIn entity: "
                            + xmlex.getSystemId() + "\n";
                } else {
                    msg = "PlotMLFrame: failed to parse PlotML data:\n";
                }

                System.err.println(msg + ex.toString());
View Full Code Here

     @exception XmlException If the name or value is null.
     */
    public void attribute(String name, String value, boolean specified)
            throws XmlException {
        if (name == null) {
            throw new XmlException("Attribute has no name",
                    _currentExternalEntity(), _parser.getLineNumber(), _parser
                            .getColumnNumber());
        }

        // NOTE: value may be null if attribute default is #IMPLIED.
View Full Code Here

     @param column The approximate column number of the error.
     *  @exception XmlException If called.
     */
    public void error(String message, String systemID, int line, int column)
            throws XmlException {
        throw new XmlException(message, _currentExternalEntity(), line, column);
    }
View Full Code Here

            if (ex instanceof XmlException) {
                throw (XmlException) ex;
            } else {
                String msg = "XML element \"" + elementName
                        + "\" triggers exception:\n  " + ex.toString();
                throw new XmlException(msg, _currentExternalEntity(), _parser
                        .getLineNumber(), _parser.getColumnNumber());
            }
        }

        _attributes.clear();
View Full Code Here

     @exception XmlException If the object argument is null.
     */
    protected void _checkForNull(Object object, String message)
            throws XmlException {
        if (object == null) {
            throw new XmlException(message, _currentExternalEntity(), _parser
                    .getLineNumber(), _parser.getColumnNumber());
        }
    }
View Full Code Here

                parser.parse(docBase, bin);
            } catch (Exception ex) {
                String msg;

                if (ex instanceof XmlException) {
                    XmlException xmlex = (XmlException) ex;
                    msg = "PlotMLApplet: failed to parse PlotML data:\n"
                            + "line: " + xmlex.getLine() + ", column: "
                            + xmlex.getColumn() + "\nIn entity: "
                            + xmlex.getSystemId() + "\n";
                } else {
                    msg = "PlotMLApplet: failed to parse PlotML data:\n";
                }

                System.err.println(msg + ex.toString());
View Full Code Here

     @exception XmlException If the name or value is null.
     */
    public void attribute(String name, String value, boolean specified)
            throws XmlException {
        if (name == null) {
            throw new XmlException("Attribute has no name",
                    _currentExternalEntity(), _parser.getLineNumber(), _parser
                            .getColumnNumber());
        }

        // NOTE: value may be null if attribute default is #IMPLIED.
View Full Code Here

            parser.parse(null, in);
        } catch (Exception ex) {
            String msg;

            if (ex instanceof XmlException) {
                XmlException xmlex = (XmlException) ex;
                msg = "PlotMLFrame: failed to parse PlotML data:\n" + "line: "
                    + xmlex.getLine() + ", column: " + xmlex.getColumn()
                    + "\nIn entity: " + xmlex.getSystemId() + "\n";
            } else {
                msg = "PlotMLFrame: failed to parse PlotML data:\n";
            }

            throw new IOException(msg);
View Full Code Here

TOP

Related Classes of com.microstar.xml.XmlException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.