From 083e4056abb42097fe670bc8a0bffe0dad5d3630 Mon Sep 17 00:00:00 2001 From: Roberto Oliveros Date: Sun, 17 May 2020 18:50:53 -0600 Subject: [PATCH] Use after clause to print client log message --- Ch_6/Ex_6-2/try_test.erl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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() ->