summaryrefslogtreecommitdiff
path: root/share/server
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-06-06 18:01:23 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-06-06 18:01:23 +0000
commitcfab1d22a87d1da8cbe15a7ac1886d67b4a928a3 (patch)
treecedf21a00b393c406bbddbde996dc27b1e4ca1e1 /share/server
parentbba6f4063ecc046bb217dafd53bef58e53857cb1 (diff)
truncate giant reduce overflow error output
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@782290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server')
-rw-r--r--share/server/views.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/server/views.js b/share/server/views.js
index de728ac2..5e193cbc 100644
--- a/share/server/views.js
+++ b/share/server/views.js
@@ -50,9 +50,11 @@ var Views = (function() {
var reduce_length = reduce_line.length;
if (query_config && query_config.reduce_limit &&
reduce_length > 200 && ((reduce_length * 2) > line.length)) {
+ var reduce_preview = "Current output: '"+(reduce_line.substring(0,100) + "'... (first 100 of "+reduce_length+' bytes)');
+
throw {
error:"reduce_overflow_error",
- reason: "Reduce output must shrink more rapidly. Current output: '"+reduce_line+"'"
+ reason: "Reduce output must shrink more rapidly: "+reduce_preview+""
};
} else {
print("[true," + reduce_line + "]");