couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Bisbee (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (COUCHDB-83) undefined in an array as a key causes an Erlang error
Date Tue, 21 Feb 2012 22:46:49 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sam Bisbee closed COUCHDB-83.
-----------------------------


Confirmed fixed in 1.1.1. Closing.
                
> undefined in an array as a key causes an Erlang error
> -----------------------------------------------------
>
>                 Key: COUCHDB-83
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-83
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>    Affects Versions: 0.7.2, 0.8
>            Reporter: Ryszard Szopa
>            Assignee: Christopher Lenz
>             Fix For: 0.8.1
>
>
> Whenever a view emits an array containing undefined as a key an Erlang is thrown:
> For example, if there's at least one document in the db without foo being set, the following
view
> function(doc) {
>   emit([doc.foo], doc);
> }
> triggers
> {{nocatch,{bad_value,"Cannot encode 'undefined' value as JSON"}},
>  [{couch_query_servers,prompt,2},
>   {couch_query_servers,'-map_docs/2-fun-0-',2},
>   {lists,map,2},
>   {couch_query_servers,map_docs,2},
>   {couch_view,view_compute,2},
>   {couch_view,update_group,1},
>   {couch_view,temp_update_loop,2}]}
> OTOH, 
> function(doc) {
>   emit(doc.foo, doc);
> }
> causes no problems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message