diff options
author | Micael Karlberg <[email protected]> | 2019-05-07 12:47:49 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-22 18:20:06 +0200 |
commit | 6d955c8377f4df9c215424349050b38b8c7628b4 (patch) | |
tree | a6209f25e02083390c454cdbfa94734761cd7349 /lib/snmp/src/agent/snmp_community_mib.erl | |
parent | 55cee8416a689d3adf57fc0b20959c328f8c83bd (diff) | |
download | otp-6d955c8377f4df9c215424349050b38b8c7628b4.tar.gz otp-6d955c8377f4df9c215424349050b38b8c7628b4.tar.bz2 otp-6d955c8377f4df9c215424349050b38b8c7628b4.zip |
[snmp] Remove use of the deprecated get_stacktrace function
Removed the use of the deprecated erlang:stacktrace() function.
Instead make use of the 'catch Class:Error:Stacktrace' feature.
OTP-15332
Diffstat (limited to 'lib/snmp/src/agent/snmp_community_mib.erl')
-rw-r--r-- | lib/snmp/src/agent/snmp_community_mib.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/snmp/src/agent/snmp_community_mib.erl b/lib/snmp/src/agent/snmp_community_mib.erl index 9fd7b30f9f..984b0bcee1 100644 --- a/lib/snmp/src/agent/snmp_community_mib.erl +++ b/lib/snmp/src/agent/snmp_community_mib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2016. All Rights Reserved. +%% Copyright Ericsson AB 1999-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -206,10 +206,10 @@ do_add_community(Community) -> {error, create_failed} end catch - {error, Reason} -> - {error, Reason}; - Class:Reason -> - {error, {Class, Reason, erlang:get_stacktrace()}} + throw:{error, _} = ERROR -> + ERROR; + C:E:S -> + {error, {C, E, S}} end. %% FIXME: does not work with mnesia |