Package eu.scape_project.planning.utils

Examples of eu.scape_project.planning.utils.ParserException


        } catch (SAXException e) {
            log.error("An error occurred while parsing the c3po profile: {}", e.getMessage());
        }

        if (validate && !this.isValid(parser, stream)) {
            throw new ParserException("Validation was turned on, but the xml file is not valid against the schema.");
        }

        try {
            final SAXReader reader = new SAXReader();
            this.profile = reader.read(stream);

            final Namespace namespace = this.profile.getRootElement().getNamespace();
            if (!namespace.getStringValue().equals(C3PO_NAMESPACE)) {
                throw new ParserException("Cannot parse the profile, namespace does not match");
            }
        } catch (final DocumentException e) {
            log.error("An error occurred while reading the profile: {}", e.getMessage());
            this.profile = null;
        }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.utils.ParserException

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.