Permalink
Browse files

Add error handling clause to catch error triplets returned from lucen…

…e_scan.

Fixes: az775

The lucene_parser module only expects errors of the form {error, Reason}
from calling lucene_scan:string, but it can return errors of the form
{error, Reason, Line} and the lack of handling of errors of this form
is causing test failures of the basho_expect cluster membership test.
This change adds a case clause to handle those errors.
  • Loading branch information...
kellymclaughlin committed Sep 28, 2011
1 parent 0e16001 commit 4ae9fca3da798508ec5388bdedbb0198a580d0ee
Showing with 3 additions and 0 deletions.
  1. +3 −0 apps/lucene_parser/src/lucene_parser.erl
@@ -26,6 +26,9 @@ parse(DefaultIndex, DefaultField, QueryString) when is_list(DefaultIndex) andals
{error, Error}
end;
{error, Error} ->
+ %% Scanning error.
+ {error, Error};
+ {error, Error, _} ->
%% Scanning error.
{error, Error}
end.

0 comments on commit 4ae9fca

Please sign in to comment.