You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/03 23:12:38 UTC

[24/29] twig commit: updated refs/heads/import to 2d56280

correctly handled truncated output.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-twig/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-twig/commit/90607c0a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-twig/tree/90607c0a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-twig/diff/90607c0a

Branch: refs/heads/import
Commit: 90607c0a49dada2c016b482208ae06599b75df8a
Parents: 8e07af3
Author: Robert Newson <ro...@cloudant.com>
Authored: Fri Jul 29 12:16:24 2011 +0100
Committer: Robert Newson <ro...@cloudant.com>
Committed: Fri Jul 29 12:16:24 2011 +0100

----------------------------------------------------------------------
 src/twig_util.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-twig/blob/90607c0a/src/twig_util.erl
----------------------------------------------------------------------
diff --git a/src/twig_util.erl b/src/twig_util.erl
index c8f9c66..b4f830c 100644
--- a/src/twig_util.erl
+++ b/src/twig_util.erl
@@ -67,7 +67,8 @@ format(Format, Data) ->
     case erts_debug:flat_size(Data) > MaxTermSize of
         true ->
             MaxString = get_env(max_message_size, 16000),
-            ["*Truncated* ", Format, " - ", trunc_io:print(Data, MaxString)];
+            {Truncated, _} = trunc_io:print(Data, MaxString),
+            ["*Truncated* ", Format, " - ", Truncated];
         false ->
             io_lib:format(Format, Data)
     end.