import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
import org.opendaylight.yangtools.yang.model.api.ModuleImport;
import org.opendaylight.yangtools.yang.model.api.stmt.ImportStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.MissingSubstatementException;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-public class ImportEffectiveStatementImpl extends EffectiveStatementBase<String, ImportStatement> implements
+public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase<String, ImportStatement> implements
ModuleImport {
private final String moduleName;
if (prefixStmt != null ) {
this.prefix = prefixStmt.argument();
} else {
- throw new IllegalStateException("Prefix is mandatory substatement of import statement");
+ throw new MissingSubstatementException("Prefix is mandatory substatement of import statement",
+ ctx.getStatementSourceReference());
}
}