2 * Copyright (c) 2015 Pantheon Technologies 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.model.ri.type;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
14 import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition.EnumPair;
17 public class InvalidEnumDefinitionException extends IllegalArgumentException {
18 private static final long serialVersionUID = 1L;
20 @SuppressFBWarnings("SE_BAD_FIELD")
21 private final EnumPair offendingEnum;
23 protected InvalidEnumDefinitionException(final EnumPair offendingEnum, final String message) {
25 this.offendingEnum = requireNonNull(offendingEnum);
28 public InvalidEnumDefinitionException(final EnumPair offendingEnum, final String format,
29 final Object... args) {
30 this(offendingEnum, String.format(format, args));
33 public EnumPair getOffendingEnum() {