2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. 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.spi.source;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.parser.spi.meta.CommonStmtCtx;
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>.
20 public class YangVersionLinkageException extends SourceException {
21 private static final long serialVersionUID = 1L;
23 public YangVersionLinkageException(final @NonNull StatementSourceReference source, final @NonNull String format,
24 final Object... args) {
25 super(source, format, args);
28 public YangVersionLinkageException(final @NonNull CommonStmtCtx stmt, final @NonNull String format,
29 final Object... args) {
30 this(stmt.sourceReference(), format, args);