Example usage for org.apache.maven.model.io ModelParseException ModelParseException

List of usage examples for org.apache.maven.model.io ModelParseException ModelParseException

Introduction

In this page you can find the example usage for org.apache.maven.model.io ModelParseException ModelParseException.

Prototype

public ModelParseException(String message, int lineNumber, int columnNumber, Throwable cause) 

Source Link

Document

Creates a new parser exception with the specified details.

Usage

From source file:org.sonatype.maven.polyglot.xml.XMLModelReader.java

License:Open Source License

public Model read(Reader input, Map<String, ?> options) throws IOException, ModelParseException {
    if (input == null) {
        throw new IllegalArgumentException("XML Reader is null.");
    }/* w  w  w . j  ava  2 s . c om*/

    Model model = null;

    try {
        model = reader.read(input);
    } catch (XmlPullParserException e) {
        throw new ModelParseException(e.getMessage(), -1, -1, e);
    }

    return model;
}