(db, fun, doc)
| 8177 | function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) { |
| 8178 | |
| 8179 | function tryMap(db, fun, doc) { |
| 8180 | // emit an event if there was an error thrown by a map function. |
| 8181 | // putting try/catches in a single function also avoids deoptimizations. |
| 8182 | try { |
| 8183 | fun(doc); |
| 8184 | } catch (e) { |
| 8185 | emitError(db, e, {fun, doc}); |
| 8186 | } |
| 8187 | } |
| 8188 | |
| 8189 | function tryReduce(db, fun, keys, values, rereduce) { |
| 8190 | // same as above, but returning the result or an error. there are two separate |
no test coverage detected
searching dependent graphs…