couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couch-index commit: updated refs/heads/master to 6565cb9
Date Mon, 07 Sep 2015 12:44:13 GMT
Repository: couchdb-couch-index
Updated Branches:
  refs/heads/master d54810000 -> 6565cb961


Throw validation error in all cases

This clarifies the validation contract; we always throw if there's a
problem with the design document.

COUCHDB-2772


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/commit/6565cb96
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/tree/6565cb96
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/diff/6565cb96

Branch: refs/heads/master
Commit: 6565cb961a8da21b21d213e4981133e119bb5ff1
Parents: d548100
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Sep 7 13:07:57 2015 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Sep 7 13:07:57 2015 +0100

----------------------------------------------------------------------
 src/couch_index_server.erl | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/6565cb96/src/couch_index_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_server.erl b/src/couch_index_server.erl
index 0f18c0b..abb4b7a 100644
--- a/src/couch_index_server.erl
+++ b/src/couch_index_server.erl
@@ -54,17 +54,11 @@ validate(DbName, DDoc) ->
             []
     end,
     ValidateFun = fun
-        (ModName, ok) ->
-            try
-                ModName:validate(DbName, DDoc)
-            catch Type:Reason ->
-                {Type, Reason}
-            end;
-        (_ModName, Error) ->
-            Error
+        (ModName) ->
+            ModName:validate(DbName, DDoc)
     end,
     EnabledIndexers = lists:flatmap(LoadModFun, config:get("indexers")),
-    lists:foldl(ValidateFun, ok, EnabledIndexers).
+    lists:foreach(ValidateFun, EnabledIndexers).
 
 
 get_index(Module, #db{name = <<"shards/", _/binary>> = DbName}, DDoc) ->


Mime
View raw message