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 static java.util.Objects.requireNonNull;
12 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
14 public class ReactorException extends Exception {
15 private static final long serialVersionUID = 1L;
17 private final ModelProcessingPhase phase;
18 private final SourceIdentifier sourceIdentifier;
20 public ReactorException(final ModelProcessingPhase phase, final String message, final SourceIdentifier sourceId,
21 final Throwable cause) {
22 super(message, cause);
23 this.phase = requireNonNull(phase);
24 this.sourceIdentifier = sourceId;
27 public ReactorException(final ModelProcessingPhase phase, final String message, final SourceIdentifier sourceId) {
29 this.phase = requireNonNull(phase);
30 this.sourceIdentifier = sourceId;
33 public final ModelProcessingPhase getPhase() {
37 public final SourceIdentifier getSourceIdentifier() {
38 return sourceIdentifier;