Skip to content

Commit

Permalink
Throw exception if there are no options configured
Browse files Browse the repository at this point in the history
  • Loading branch information
elmer-garduno committed Jan 16, 2013
1 parent c0a5827 commit c8811bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/edu/cmu/lti/oaqa/ecd/phase/BasePhase.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public void initialize(UimaContext ctx) throws ResourceInitializationException {
.getConfigParameterValue(BaseExperimentBuilder.EXPERIMENT_UUID_PROPERTY);
String optDescr = (String) ctx.getConfigParameterValue("options");
this.options = loadOptions(optDescr, ctx);
if (size() == 0) {
throw new ResourceInitializationException(new IllegalArgumentException(
"Phase: " + toString() + " provided no options"));
}
for (AnalysisEngine ae : options) {
System.out.println("\t- " + ae.getAnalysisEngineMetaData().getName());
}
Expand Down

0 comments on commit c8811bb

Please sign in to comment.