Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 62404 invoked from network); 4 Sep 2010 13:24:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Sep 2010 13:24:04 -0000 Received: (qmail 56334 invoked by uid 500); 4 Sep 2010 13:24:04 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 56214 invoked by uid 500); 4 Sep 2010 13:24:02 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 56207 invoked by uid 99); 4 Sep 2010 13:24:02 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Sep 2010 13:24:02 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Sep 2010 13:23:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B065F23889C5; Sat, 4 Sep 2010 13:23:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r992599 - /couchdb/branches/new_replicator/src/couchdb/couch_httpd_rep.erl Date: Sat, 04 Sep 2010 13:23:23 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100904132323.B065F23889C5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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").