incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [14/14] git commit: Adding some error checking.
Date Wed, 15 Jan 2014 22:04:01 GMT
Adding some error checking.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/1bbc2543
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/1bbc2543
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/1bbc2543

Branch: refs/heads/apache-blur-0.2
Commit: 1bbc254388d0af18fdbeec16116a4720f9738833
Parents: 3b3cade
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Jan 15 16:53:10 2014 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Jan 15 16:53:10 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/blur/manager/BlurHighlighter.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1bbc2543/blur-core/src/main/java/org/apache/blur/manager/BlurHighlighter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/BlurHighlighter.java b/blur-core/src/main/java/org/apache/blur/manager/BlurHighlighter.java
index bc5d8ba..d79759c 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/BlurHighlighter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/BlurHighlighter.java
@@ -40,7 +40,13 @@ public class BlurHighlighter {
     if (highlightOptions != null) {
       _preTag = highlightOptions.getPreTag();
       _postTag = highlightOptions.getPostTag();
+      if (highlightQuery == null) {
+        throw new RuntimeException("Highlight query cannot be null.");
+      }
       _highlightQuery = highlightQuery;
+      if (fieldManager == null) {
+        throw new RuntimeException("FieldManager query cannot be null.");
+      }
       _fieldManager = fieldManager;
       _shouldHighlight = true;
     } else {


Mime
View raw message