You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2009/06/06 20:01:24 UTC

svn commit: r782290 - /couchdb/trunk/share/server/views.js

Author: jchris
Date: Sat Jun  6 18:01:23 2009
New Revision: 782290

URL: http://svn.apache.org/viewvc?rev=782290&view=rev
Log:
truncate giant reduce overflow error output

Modified:
    couchdb/trunk/share/server/views.js

Modified: couchdb/trunk/share/server/views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/views.js?rev=782290&r1=782289&r2=782290&view=diff
==============================================================================
--- couchdb/trunk/share/server/views.js (original)
+++ couchdb/trunk/share/server/views.js Sat Jun  6 18:01:23 2009
@@ -50,9 +50,11 @@
     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 + "]");