X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Frepo%2Fapi%2FMissingSchemaSourceException.java;h=2062a635516496682397f5bb1ce32d30bed329a7;hb=c4dc5b33e7d24670b59cc81b65e15b37a3268608;hp=17c9c906172fbb40f3d164e0fb9801405cbda403;hpb=df568194d106efa63c3138f0cc699dd53735cf44;p=yangtools.git diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/MissingSchemaSourceException.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/MissingSchemaSourceException.java index 17c9c90617..2062a63551 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/MissingSchemaSourceException.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/MissingSchemaSourceException.java @@ -3,11 +3,12 @@ * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/eplv10.html + * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.model.repo.api; import com.google.common.annotations.Beta; +import com.google.common.base.Preconditions; /** * Exception thrown when a the specified schema source is not available. @@ -16,11 +17,18 @@ import com.google.common.annotations.Beta; public class MissingSchemaSourceException extends SchemaSourceException { private static final long serialVersionUID = 1L; - public MissingSchemaSourceException(final String message) { - super(message); + private final SourceIdentifier id; + + public MissingSchemaSourceException(final String message, final SourceIdentifier id) { + this(message, id, null); + } + + public MissingSchemaSourceException(final String s, final SourceIdentifier id, final Throwable t) { + super(s, t); + this.id = Preconditions.checkNotNull(id); } - public MissingSchemaSourceException(final String message, final Throwable cause) { - super(message, cause); + public SourceIdentifier getSourceId() { + return id; } }