aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/src/logger.erl')
-rw-r--r--lib/kernel/src/logger.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index 7606912da4..943ef8c2d1 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -621,9 +621,13 @@ get_type_config(Type) ->
-spec limit_term(term()) -> term().
limit_term(Term) ->
- case get_format_depth() of
+ try get_format_depth() of
unlimited -> Term;
D -> io_lib:limit_term(Term, D)
+ catch error:badarg ->
+ %% This could happen during system termination, after
+ %% application_controller process is dead.
+ unlimited
end.
-spec get_format_depth() -> 'unlimited' | pos_integer().