aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-02-11 15:49:17 +0100
committerSiri Hansen <[email protected]>2019-02-11 15:49:17 +0100
commit9f88ada0ac1d76aa96184c09f4e256038e92eb3b (patch)
tree46a95c483a89108065c99bca59b4da2353d6e265
parent2b8a46f154fb411c47262eb1c439a912d1fc8fd5 (diff)
parent00edd430ab158c34ac4a344b93cf46cd8d4912b1 (diff)
downloadotp-9f88ada0ac1d76aa96184c09f4e256038e92eb3b.tar.gz
otp-9f88ada0ac1d76aa96184c09f4e256038e92eb3b.tar.bz2
otp-9f88ada0ac1d76aa96184c09f4e256038e92eb3b.zip
Merge branch 'siri/observer/crash-toggle-log-view/OTP-15553' into maint
* siri/observer/crash-toggle-log-view/OTP-15553: [observer] Don't crash on Log > Toggle Log View
-rw-r--r--lib/observer/src/observer_wx.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 453e3bdc2d..fe51afa240 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -771,7 +771,11 @@ ensure_sasl_started(Node) ->
ensure_mf_h_handler_used(Node) ->
%% is log_mf_h used ?
- Handlers = rpc:block_call(Node, gen_event, which_handlers, [error_logger]),
+ Handlers =
+ case rpc:block_call(Node, gen_event, which_handlers, [error_logger]) of
+ {badrpc,{'EXIT',noproc}} -> []; % OTP-21+ and no event handler exists
+ Hs -> Hs
+ end,
case lists:any(fun(L)-> L == log_mf_h end, Handlers) of
false -> throw("Error: log_mf_h handler not used in sasl."),
error;