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 <[email protected]>
Authored: Fri Jul 29 12:16:24 2011 +0100
Committer: Robert Newson <[email protected]>
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.

Reply via email to