2 * Copyright (c) 2015 Cisco Systems, Inc. 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.meta;
10 import com.google.common.base.Preconditions;
11 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
14 public class ReactorException extends Exception {
16 private static final long serialVersionUID = 1L;
17 private final ModelProcessingPhase phase;
18 private final SourceIdentifier sourceIdentifier;
20 public ReactorException(ModelProcessingPhase phase, String message, SourceIdentifier sourceId, Throwable cause) {
21 super(message, cause);
22 this.phase = Preconditions.checkNotNull(phase);
23 this.sourceIdentifier = sourceId;
26 public ReactorException(ModelProcessingPhase phase, String message, SourceIdentifier sourceId) {
28 this.phase = Preconditions.checkNotNull(phase);
29 this.sourceIdentifier = sourceId;
32 public final ModelProcessingPhase getPhase() {
36 public final SourceIdentifier getSourceIdentifier() {
37 return sourceIdentifier;