Switch Import/Include/BelongsTo statements to use Unqualified
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / source / YangVersionLinkageException.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. 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/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.parser.spi.source;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.parser.spi.meta.CommonStmtCtx;
13
14 /**
15  * An exception indicating source-level problem across multiple YANG sources relating to how they are allowed to be
16  * linked between YANG versions. This typically indicates a direct violation of
17  * <a href="https://datatracker.ietf.org/doc/html/rfc7950#section-12">RFC7950 section 12</a>.
18  */
19 @Beta
20 public class YangVersionLinkageException extends SourceException {
21     private static final long serialVersionUID = 1L;
22
23     public YangVersionLinkageException(final @NonNull StatementSourceReference source, final @NonNull String format,
24             final Object... args) {
25         super(source, format, args);
26     }
27
28     public YangVersionLinkageException(final @NonNull CommonStmtCtx stmt, final @NonNull String format,
29             final Object... args) {
30         this(stmt.sourceReference(), format, args);
31     }
32 }