aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_html_lib.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-09-19 16:29:33 +0200
committerSiri Hansen <[email protected]>2017-09-19 16:29:33 +0200
commit8b24be58d37a8912efdcec9cd1e354cfa41e4ef4 (patch)
tree4dd56d366268fbb37e12ea9d564e9f24b81566aa /lib/observer/src/observer_html_lib.erl
parent6d11362936408091aa7108c252f2f7bf20cdc327 (diff)
parent3979e914660993a06f1a84dd6e4196181964609a (diff)
downloadotp-8b24be58d37a8912efdcec9cd1e354cfa41e4ef4.tar.gz
otp-8b24be58d37a8912efdcec9cd1e354cfa41e4ef4.tar.bz2
otp-8b24be58d37a8912efdcec9cd1e354cfa41e4ef4.zip
Merge branch 'maint'
Conflicts: lib/observer/src/crashdump_viewer.erl lib/sasl/src/sasl.appup.src lib/stdlib/src/stdlib.appup.src
Diffstat (limited to 'lib/observer/src/observer_html_lib.erl')
-rw-r--r--lib/observer/src/observer_html_lib.erl29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/observer/src/observer_html_lib.erl b/lib/observer/src/observer_html_lib.erl
index 92fc7cec92..68381bcc7b 100644
--- a/lib/observer/src/observer_html_lib.erl
+++ b/lib/observer/src/observer_html_lib.erl
@@ -337,17 +337,24 @@ href_proc_bin(From, T, Acc, LTB) ->
Size = list_to_integer(SizeStr),
PreviewSize = min(Size,10),
Id = {list_to_integer(Offset),PreviewSize,list_to_integer(Pos)},
- {ok,PreviewBin} = crashdump_viewer:expand_binary(Id),
- PreviewStr = preview_string(Size, PreviewBin),
- if LTB ->
- href("TARGET=\"expanded\"",
- ["#Binary?offset="++Offset++
- "&size="++SizeStr++
- "&pos="++Pos],
- PreviewStr);
- true ->
- PreviewStr
- end;
+ case crashdump_viewer:expand_binary(Id) of
+ {ok, '#CDVTruncatedBinary'} ->
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">"
+ "&lt;&lt;...(Truncated Binary)&gt;&gt;"
+ "</FONT>");
+ {ok, PreviewBin} ->
+ PreviewStr = preview_string(Size, PreviewBin),
+ if LTB ->
+ href("TARGET=\"expanded\"",
+ ["#Binary?offset="++Offset++
+ "&size="++SizeStr++
+ "&pos="++Pos],
+ PreviewStr);
+ true ->
+ PreviewStr
+ end
+ end;
[PreviewIntStr,SizeStr,Md5] when From =:= obs ->
Size = list_to_integer(SizeStr),
PreviewInt = list_to_integer(PreviewIntStr),