diff options
author | Anders Svensson <[email protected]> | 2018-06-06 17:39:06 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2018-06-07 11:16:32 +0200 |
commit | 928eca9c694f098d65873f4ac6ceb19b6ba13d6b (patch) | |
tree | acf954a0d7c78cb5037a7c1bd0c461900f520e4c /lib/diameter/src/base/diameter_lib.erl | |
parent | d3b4568f6d910eb4ce26b7a899c8c414ae252386 (diff) | |
download | otp-928eca9c694f098d65873f4ac6ceb19b6ba13d6b.tar.gz otp-928eca9c694f098d65873f4ac6ceb19b6ba13d6b.tar.bz2 otp-928eca9c694f098d65873f4ac6ceb19b6ba13d6b.zip |
Don't use deprecated erlang:get_stacktrace/0
Diffstat (limited to 'lib/diameter/src/base/diameter_lib.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_lib.erl | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/diameter/src/base/diameter_lib.erl b/lib/diameter/src/base/diameter_lib.erl index 1c1ea42cb5..edd9d5a4ce 100644 --- a/lib/diameter/src/base/diameter_lib.erl +++ b/lib/diameter/src/base/diameter_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2017. All Rights Reserved. +%% Copyright Ericsson AB 2010-2018. 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. @@ -33,7 +33,7 @@ time/1, eval/1, eval_name/1, - get_stacktrace/0, + stacktrace/1, ipaddr/1, spawn_opts/2, wait/1, @@ -42,16 +42,13 @@ log/4]). %% --------------------------------------------------------------------------- -%% # get_stacktrace/0 +%% # stacktrace/1 %% --------------------------------------------------------------------------- %% Return a stacktrace with a leading, potentially large, argument -%% list replaced by an arity. Trace on stacktrace/0 to see the +%% list replaced by an arity. Trace on stacktrace/1 to see the %% original. -get_stacktrace() -> - stacktrace(erlang:get_stacktrace()). - stacktrace([{M,F,A,L} | T]) when is_list(A) -> [{M, F, length(A), L} | T]; stacktrace(L) -> @@ -268,8 +265,8 @@ ipaddr(Addr) -> try ip(Addr) catch - error: _ -> - erlang:error({invalid_address, erlang:get_stacktrace()}) + error: _: Stack -> + erlang:error({invalid_address, Stack}) end. %% Already a tuple: ensure non-negative integers of the right size. |