From 5f9b4293bc029e2132d7c442cb5b4480915ea0e4 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 3 May 2018 07:12:11 -0400 Subject: Work around OTP-21 deprecation of get_stacktrace() Based off a macro by @okeuday at https://github.com/erlang/otp/pull/1783 --- src/rebar_agent.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rebar_agent.erl') diff --git a/src/rebar_agent.erl b/src/rebar_agent.erl index b5dcfcf..8d0f9cf 100644 --- a/src/rebar_agent.erl +++ b/src/rebar_agent.erl @@ -114,8 +114,8 @@ run(Namespace, Command, StrArgs, RState, Cwd) -> {{error, cwd_changed}, RState} end catch - Type:Reason -> - ?DEBUG("Agent Stacktrace: ~p", [erlang:get_stacktrace()]), + ?WITH_STACKTRACE(Type, Reason, Stacktrace) + ?DEBUG("Agent Stacktrace: ~p", [Stacktrace]), {{error, {Type, Reason}}, RState} end. -- cgit v1.1