diff --git a/Ch_6/Ex_6-2/try_test.erl b/Ch_6/Ex_6-2/try_test.erl index 98e5f34..51012d0 100644 --- a/Ch_6/Ex_6-2/try_test.erl +++ b/Ch_6/Ex_6-2/try_test.erl @@ -29,14 +29,13 @@ catcher(N) -> Val -> {N, normal, Val} catch throw:X -> - log_file({N, caught, thrown, X}), - client_log(); + log_file({N, caught, thrown, X}); exit:X -> - log_file({N, caught, exited, X}), - client_log(); + log_file({N, caught, exited, X}); error:X -> - log_file({N, caught, error, X}), - client_log() + log_file({N, caught, error, X}) + after + client_log() end. client_log() ->