Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for 
change notification.

The "Error_messages" page has been changed by JeffOllie.
The comment on this change is: Document cause of runtime error.
http://wiki.apache.org/couchdb/Error_messages?action=diff&rev1=19&rev2=20

--------------------------------------------------

  
  While the above guard will work in most cases, it's worth bearing 
!JavaScript's falsy set of values in mind. Testing against a property with a 
value of `0` (zero), `''` (empty String), `false` or `null` will return false. 
If this is undesired a guard of the form `if (doc.foo !== undefined)` should do 
the trick.
  
+ This error can also be caused if a reduce function does not return a value.  
For example, this reduce function will cause an error:
+ 
+ {{{
+ function(key, values) {
+   sum(values);
+ }
+ }}}
+ 
+ The function needs to return a value:
+ 
+ {{{
+ function(key, values) {
+   return sum(values);
+ }
+ }}}
+ 
  <<Anchor(replicationreceivedexceptionerrorbadmatchreasonerroralreadypresent)>>
  == replication received exception 
({"error":"badmatch","reason":"{error,already_present}"}) ==
  

Reply via email to