diff options
author | Hans Bolinder <[email protected]> | 2018-02-05 12:36:28 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-02-06 14:39:42 +0100 |
commit | 1040c3c48099e5ee6b65cb2af5e8bf446764fef3 (patch) | |
tree | 05200fe34835cc2ff05b5c4bc9bef4432664d37f /lib/mnesia/src/mnesia_dumper.erl | |
parent | 798f2151429ef7ea05d858e5ba9efc6d5cc3e10a (diff) | |
download | otp-1040c3c48099e5ee6b65cb2af5e8bf446764fef3.tar.gz otp-1040c3c48099e5ee6b65cb2af5e8bf446764fef3.tar.bz2 otp-1040c3c48099e5ee6b65cb2af5e8bf446764fef3.zip |
mnesia: Do not call erlang:get_stacktrace()
The remaining call (in module mnesia_lib) is taken care
of in the following commit.
Diffstat (limited to 'lib/mnesia/src/mnesia_dumper.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_dumper.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl index f0ed7aef4a..c50052aa68 100644 --- a/lib/mnesia/src/mnesia_dumper.erl +++ b/lib/mnesia/src/mnesia_dumper.erl @@ -191,8 +191,7 @@ do_perform_dump(Cont, InPlace, InitBy, Regulator, OldVersion) -> try insert_recs(Recs, InPlace, InitBy, Regulator, OldVersion) of Version -> do_perform_dump(C2, InPlace, InitBy, Regulator, Version) - catch _:R when R =/= fatal -> - ST = erlang:get_stacktrace(), + catch _:R:ST when R =/= fatal -> Reason = {"Transaction log dump error: ~tp~n", [{R, ST}]}, close_files(InPlace, {error, Reason}, InitBy), exit(Reason) @@ -325,8 +324,7 @@ perform_update(Tid, SchemaOps, _DumperMode, _UseDir) -> ?eval_debug_fun({?MODULE, post_dump}, [InitBy]), close_files(InPlace, ok, InitBy), ok - catch _:Reason when Reason =/= fatal -> - ST = erlang:get_stacktrace(), + catch _:Reason:ST when Reason =/= fatal -> Error = {error, {"Schema update error", {Reason, ST}}}, close_files(InPlace, Error, InitBy), fatal("Schema update error ~tp ~tp", [{Reason,ST}, SchemaOps]) |