2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/eplv10.html
8 package org.opendaylight.controller.yang.parser.util;
10 public class YangParseException extends RuntimeException {
12 private static final long serialVersionUID = 1239548963471793178L;
14 public YangParseException(final String errorMsg) {
18 public YangParseException(final String errorMsg, final Exception exception) {
19 super(errorMsg, exception);
22 public YangParseException(final int line, final String errorMsg) {
23 super("Error on line " + line + ": " + errorMsg);
26 public YangParseException(final int line, final String errorMsg,
27 final Exception exception) {
28 super("Error on line " + line + ": " + errorMsg, exception);
31 public YangParseException(final String moduleName, final int line,
32 final String errorMsg) {
33 super("Error in module '" + moduleName + "' on line " + line + ": "
37 public YangParseException(final String moduleName, final int line,
38 final String errorMsg, final Exception exception) {
39 super("Error in module '" + moduleName + "' on line " + line + ": "
40 + errorMsg, exception);