You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2016/04/28 00:53:11 UTC

nifi git commit: NIFI-1818 Adjusting exceptions to reflect the appropriate repository instantiation that caused the issue.

Repository: nifi
Updated Branches:
  refs/heads/master 6938c3db5 -> 11cff0dd3


NIFI-1818 Adjusting exceptions to reflect the appropriate repository instantiation that caused the issue.

This closes #385.

Signed-off-by: Andy LoPresto <al...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/11cff0dd
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/11cff0dd
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/11cff0dd

Branch: refs/heads/master
Commit: 11cff0dd39bef193565e8023c8f69d9f44615927
Parents: 6938c3d
Author: Aldrin Piri <al...@apache.org>
Authored: Wed Apr 27 17:09:18 2016 -0400
Committer: Andy LoPresto <al...@apache.org>
Committed: Wed Apr 27 15:52:54 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/controller/FlowController.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/11cff0dd/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
index 13a01bb..8c1cb9b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/FlowController.java
@@ -418,10 +418,14 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
         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 {
@@ -735,7 +739,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
     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);
         }