import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
+import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
/**
* Specialization of {@link BaseQNameStatementSupport} for {@code input} and {@code output} statements.
private final Function<QNameModule, QName> createArgument;
protected BaseOperationContainerStatementSupport(final StatementDefinition publicDefinition,
- final Function<QNameModule, QName> createArgument) {
- super(publicDefinition);
+ final Function<QNameModule, QName> createArgument, final CopyPolicy copyPolicy) {
+ super(publicDefinition, copyPolicy);
this.createArgument = requireNonNull(createArgument);
}
@Override
protected final @NonNull E createDeclaredEffective(final Current<QName, D> stmt,
final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
- return createDeclaredEffective(historyAndStatusFlags(stmt.history(), substatements), stmt, substatements);
+ try {
+ return createDeclaredEffective(historyAndStatusFlags(stmt.history(), substatements), stmt, substatements);
+ } catch (SubstatementIndexingException e) {
+ throw new SourceException(e.getMessage(), stmt, e);
+ }
}
protected abstract @NonNull E createDeclaredEffective(int flags, @NonNull Current<QName, D> stmt,