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/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.util;
11 * @deprecated This exception is not produced anywhere and is scheduled for removal.
13 // TODO: switch to checked exception, add YangSemanticException
15 public class YangParseException extends RuntimeException {
16 private static final long serialVersionUID = 1239548963471793178L;
18 public YangParseException(final String errorMsg) {
22 public YangParseException(final String errorMsg, final Exception exception) {
23 super(errorMsg, exception);
26 public YangParseException(final String moduleName, final int line, final String errorMsg) {
27 super("Error in module '" + moduleName + "' at line " + line + ": " + errorMsg);
30 public YangParseException(final String moduleName, final int line, final String errorMsg, final Exception exception) {
31 super("Error in module '" + moduleName + "' at line " + line + ": " + errorMsg, exception);