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.yangtools.yang.parser.util;
10 // TODO: switch to checked exception, add YangSemanticException
11 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 String moduleName, final int line, final String errorMsg) {
23 super("Error in module '" + moduleName + "' at line " + line + ": " + errorMsg);
26 public YangParseException(final String moduleName, final int line, final String errorMsg, final Exception exception) {
27 super("Error in module '" + moduleName + "' at line " + line + ": " + errorMsg, exception);