couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r992599 - /couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl
Date Sat, 04 Sep 2010 13:23:23 GMT
Author: fdmanana
Date: Sat Sep  4 13:23:23 2010
New Revision: 992599

URL: http://svn.apache.org/viewvc?rev=992599&view=rev
Log:
New replicator: remove no longer necessary exception catch.

Modified:
    couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl

Modified: couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl?rev=992599&r1=992598&r2=992599&view=diff
==============================================================================
--- couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl (original)
+++ couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl Sat Sep  4 13:23:23 2010
@@ -33,7 +33,7 @@ handle_req(#httpd{method='POST'} = Req) 
     SrcDb = parse_rep_db(couch_util:get_value(<<"source">>, PostBody)),
     TgtDb = parse_rep_db(couch_util:get_value(<<"target">>, PostBody)),
     Options = convert_options(PostBody),
-    try couch_replicate:replicate(SrcDb, TgtDb, Options, Req#httpd.user_ctx) of
+    case couch_replicate:replicate(SrcDb, TgtDb, Options, Req#httpd.user_ctx) of
     {error, Reason} ->
         try
             send_json(Req, 500, {[{error, Reason}]})
@@ -47,9 +47,6 @@ handle_req(#httpd{method='POST'} = Req) 
         send_json(Req, 200, {[{ok, true}, {<<"_local_id">>, RepId}]});
     {ok, {HistoryResults}} ->
         send_json(Req, {[{ok, true} | HistoryResults]})
-    catch
-    throw:{db_not_found, Msg} ->
-        send_json(Req, 404, {[{error, db_not_found}, {reason, Msg}]})
     end;
 handle_req(Req) ->
     send_method_not_allowed(Req, "POST").



Mime
View raw message