Skip to content

Commit

Permalink
NIFI-1818 Adjusting exceptions to reflect the appropriate repository …
Browse files Browse the repository at this point in the history
…instantiation that caused the issue.

This closes apache#385.

Signed-off-by: Andy LoPresto <[email protected]>
  • Loading branch information
apiri authored and alopresto committed Apr 27, 2016
1 parent 6938c3d commit 11cff0d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,14 @@ private FlowController(
try {
this.provenanceEventRepository = createProvenanceRepository(properties);
this.provenanceEventRepository.initialize(createEventReporter(bulletinRepository));
} catch (final Exception e) {
throw new RuntimeException("Unable to create Provenance Repository", e);
}

try {
this.contentRepository = createContentRepository(properties);
} catch (final Exception e) {
throw new RuntimeException("Unable to create Provenance Repository", e);
throw new RuntimeException("Unable to create Content Repository", e);
}

try {
Expand Down Expand Up @@ -735,7 +739,7 @@ public void onFlowInitialized(final boolean startDelayedComponents) {
private ContentRepository createContentRepository(final NiFiProperties properties) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
final String implementationClassName = properties.getProperty(NiFiProperties.CONTENT_REPOSITORY_IMPLEMENTATION, DEFAULT_CONTENT_REPO_IMPLEMENTATION);
if (implementationClassName == null) {
throw new RuntimeException("Cannot create Provenance Repository because the NiFi Properties is missing the following property: "
throw new RuntimeException("Cannot create Content Repository because the NiFi Properties is missing the following property: "
+ NiFiProperties.CONTENT_REPOSITORY_IMPLEMENTATION);
}

Expand Down

0 comments on commit 11cff0d

Please sign in to comment.