Merge "Improvements REST documentation generation"
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / util / YangParseException.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.util;
9
10 // TODO: switch to checked exception, add YangSemanticException
11 public class YangParseException extends RuntimeException {
12     private static final long serialVersionUID = 1239548963471793178L;
13
14     public YangParseException(final String errorMsg) {
15         super(errorMsg);
16     }
17
18     public YangParseException(final String errorMsg, final Exception exception) {
19         super(errorMsg, exception);
20     }
21
22     public YangParseException(final String moduleName, final int line, final String errorMsg) {
23         super("Error in module '" + moduleName + "' at line " + line + ": " + errorMsg);
24     }
25
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);
28     }
29
30
31 }