diff options
author | Dan Gudmundsson <[email protected]> | 2014-04-29 10:09:08 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-03-27 13:15:24 +0100 |
commit | a83bf960f1018217d7f3c9c8387a37722aa93fc6 (patch) | |
tree | fddad434266d4af2e4835d4b071be9a4c798f5ec /lib/mnesia/test/mnesia_config_backup.erl | |
parent | bb7642ee5f326b25425634cfc40baa385f5ab3fa (diff) | |
download | otp-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/test/mnesia_config_backup.erl')
-rw-r--r-- | lib/mnesia/test/mnesia_config_backup.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mnesia/test/mnesia_config_backup.erl b/lib/mnesia/test/mnesia_config_backup.erl index 0916e255e2..a7d8c04a45 100644 --- a/lib/mnesia/test/mnesia_config_backup.erl +++ b/lib/mnesia/test/mnesia_config_backup.erl @@ -90,7 +90,8 @@ open_read(Name) -> List = lists:reverse(ReverseList), {ok, #backup{name = Name, mode = read, items = List}}; {error, Reason} -> - {error, {open_read, Reason}} + %% {error, {open_read, Reason}} + {Reason, error} %% Testing error handling in mnesia end. read(Opaque) when Opaque#backup.mode == read -> |