From 68b52ba14777198ad3bfd2bcca1760ade2fc5290 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Sat, 5 Mar 2011 17:54:22 +0000 Subject: Merged revision 1076368 from trunk 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). git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1078317 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_util.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl index 3de7739b..53dfe5e3 100644 --- a/src/couchdb/couch_util.erl +++ b/src/couchdb/couch_util.erl @@ -340,7 +340,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) -> -- cgit v1.2.3