incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [28/28] git commit: Adding some error checking.
Date Wed, 15 Jan 2014 22:03:51 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/5f889686
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/5f889686
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/5f889686

Branch: refs/heads/master
Commit: 5f8896865d4c33dce489ee54a5bab1bc0a84bb0e
Parents: 2be7ad3
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 17:03:04 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/5f889686/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