couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1076368 - /couchdb/trunk/src/couchdb/couch_util.erl
Date Wed, 02 Mar 2011 20:37:09 GMT
Author: fdmanana
Date: Wed Mar  2 20:37:09 2011
New Revision: 1076368

URL: http://svn.apache.org/viewvc?rev=1076368&view=rev
Log:
Catch all in couch_util:to_binary/1 list argument clause

When a list_to_binary call fails, the error tag is 'error' and not 'throw'.
This was noticed when this clause was being hit in an error clause of the
replication http handler (couch_httpd_replicator.erl).


Modified:
    couchdb/trunk/src/couchdb/couch_util.erl

Modified: couchdb/trunk/src/couchdb/couch_util.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_util.erl?rev=1076368&r1=1076367&r2=1076368&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_util.erl (original)
+++ couchdb/trunk/src/couchdb/couch_util.erl Wed Mar  2 20:37:09 2011
@@ -327,7 +327,7 @@ to_binary(V) when is_list(V) ->
     try
         list_to_binary(V)
     catch
-        _ ->
+        _:_ ->
             list_to_binary(io_lib:format("~p", [V]))
     end;
 to_binary(V) when is_atom(V) ->



Mime
View raw message