aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/wxe_master.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-06-02 16:15:08 +0200
committerDan Gudmundsson <[email protected]>2016-06-03 10:36:46 +0200
commit06fc37fdb5154af145480154e247637bf3ed427d (patch)
tree2733f063315697b374ab45536051954ce09d78da /lib/wx/src/wxe_master.erl
parent77b6b9a3c5d044a832ba36f8683bbe88279d8c88 (diff)
downloadotp-06fc37fdb5154af145480154e247637bf3ed427d.tar.gz
otp-06fc37fdb5154af145480154e247637bf3ed427d.tar.bz2
otp-06fc37fdb5154af145480154e247637bf3ed427d.zip
wx: Change async error handling
Previously error from async functions made an exit when the next sync call checked the message queue. This have been changed to an error report instead since the errors where async there where really hard to handle. Also changed the error report format to make it easier to filter them with a custom error_handler.
Diffstat (limited to 'lib/wx/src/wxe_master.erl')
-rw-r--r--lib/wx/src/wxe_master.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl
index 06be0367f8..e17a3327ac 100644
--- a/lib/wx/src/wxe_master.erl
+++ b/lib/wx/src/wxe_master.erl
@@ -185,10 +185,10 @@ handle_cast(_Msg, State) ->
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
handle_info({wxe_driver, error, Msg}, State) ->
- error_logger:format("WX ERROR: ~s~n", [Msg]),
+ error_logger:error_report([{wx, error}, {message, lists:flatten(Msg)}]),
{noreply, State};
handle_info({wxe_driver, internal_error, Msg}, State) ->
- error_logger:format("WX INTERNAL ERROR: ~s~n", [Msg]),
+ error_logger:error_report([{wx, internal_error}, {message, lists:flatten(Msg)}]),
{noreply, State};
handle_info({wxe_driver, debug, Msg}, State) ->
io:format("WX DBG: ~s~n", [Msg]),