aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_late_loader.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-04-29 10:09:08 +0200
committerDan Gudmundsson <[email protected]>2015-03-27 13:15:24 +0100
commita83bf960f1018217d7f3c9c8387a37722aa93fc6 (patch)
treefddad434266d4af2e4835d4b071be9a4c798f5ec /lib/mnesia/src/mnesia_late_loader.erl
parentbb7642ee5f326b25425634cfc40baa385f5ab3fa (diff)
downloadotp-a83bf960f1018217d7f3c9c8387a37722aa93fc6.tar.gz
otp-a83bf960f1018217d7f3c9c8387a37722aa93fc6.tar.bz2
otp-a83bf960f1018217d7f3c9c8387a37722aa93fc6.zip
mnesia: Replace catch with try-catch
Avoids building stacktraces where it is not needed and do not mask errors, i.e. only catch the relevant classes in each try.
Diffstat (limited to 'lib/mnesia/src/mnesia_late_loader.erl')
-rw-r--r--lib/mnesia/src/mnesia_late_loader.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_late_loader.erl b/lib/mnesia/src/mnesia_late_loader.erl
index d09de3ca66..9a113c6306 100644
--- a/lib/mnesia/src/mnesia_late_loader.erl
+++ b/lib/mnesia/src/mnesia_late_loader.erl
@@ -36,17 +36,19 @@
-define(SERVER_NAME, ?MODULE).
+-include("mnesia.hrl").
+
-record(state, {supervisor}).
async_late_disc_load(_, [], _) -> ok;
async_late_disc_load(Node, Tabs, Reason) ->
Msg = {async_late_disc_load, Tabs, Reason},
- catch ({?SERVER_NAME, Node} ! {self(), Msg}).
+ ?SAFE({?SERVER_NAME, Node} ! {self(), Msg}).
maybe_async_late_disc_load(_, [], _) -> ok;
maybe_async_late_disc_load(Node, Tabs, Reason) ->
Msg = {maybe_async_late_disc_load, Tabs, Reason},
- catch ({?SERVER_NAME, Node} ! {self(), Msg}).
+ ?SAFE({?SERVER_NAME, Node} ! {self(), Msg}).
start() ->
mnesia_monitor:start_proc(?SERVER_NAME, ?MODULE, init, [self()]).