couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r782290 - /couchdb/trunk/share/server/views.js
Date Sat, 06 Jun 2009 18:01:24 GMT
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 + "]");



Mime
View raw message