couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r737538 - /couchdb/trunk/src/couchdb/couch_doc.erl
Date Sun, 25 Jan 2009 17:11:38 GMT
Author: jchris
Date: Sun Jan 25 17:11:37 2009
New Revision: 737538

URL: http://svn.apache.org/viewvc?rev=737538&view=rev
Log:
more informative error message on a bad json document

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

Modified: couchdb/trunk/src/couchdb/couch_doc.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_doc.erl?rev=737538&r1=737537&r2=737538&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_doc.erl (original)
+++ couchdb/trunk/src/couchdb/couch_doc.erl Sun Jan 25 17:11:37 2009
@@ -145,7 +145,10 @@
         deleted = proplists:get_value(<<"_deleted">>, Props, false),
         body = NewBody,
         attachments = Bins
-        }.
+        };
+
+from_json_obj(Other) ->
+    throw({invalid_json_object, "Document must be a JSON object"}).
 
 to_doc_info(FullDocInfo) ->
     {DocInfo, _Path} = to_doc_info_path(FullDocInfo),



Mime
View raw message