aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_statem.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-05-18 10:16:52 +0200
committerHans Bolinder <[email protected]>2017-05-18 15:37:21 +0200
commit0b1fe37dbcfaad9b28ef529aa4f7b4be60ec5da8 (patch)
treee30cf426739937b0cf825dae28e5e65bd6709c86 /lib/stdlib/src/gen_statem.erl
parenta99b0a2a570e7429b05f3ce424880744ee3a8814 (diff)
downloadotp-0b1fe37dbcfaad9b28ef529aa4f7b4be60ec5da8.tar.gz
otp-0b1fe37dbcfaad9b28ef529aa4f7b4be60ec5da8.tar.bz2
otp-0b1fe37dbcfaad9b28ef529aa4f7b4be60ec5da8.zip
stdlib: Limit the size of gen_statem's error events
The postponed events, the user state and data, and the error reason are all limited in error events (if the Kernel variable error_logger_format_depth is set).
Diffstat (limited to 'lib/stdlib/src/gen_statem.erl')
-rw-r--r--lib/stdlib/src/gen_statem.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index 86109f04b4..b5e9da1e66 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -1722,6 +1722,8 @@ error_info(
end;
_ -> {Reason,Stacktrace}
end,
+ [LimitedP, LimitedFmtData, LimitedFixedReason] =
+ [error_logger:limit_term(D) || D <- [P, FmtData, FixedReason]],
CBMode =
case StateEnter of
true ->
@@ -1755,8 +1757,8 @@ error_info(
[] -> [];
[Event|_] -> [Event]
end] ++
- [FmtData,
- Class,FixedReason,
+ [LimitedFmtData,
+ Class,LimitedFixedReason,
CBMode] ++
case Q of
[_|[_|_] = Events] -> [Events];
@@ -1764,7 +1766,7 @@ error_info(
end ++
case P of
[] -> [];
- _ -> [P]
+ _ -> [LimitedP]
end ++
case FixedStacktrace of
[] -> [];