aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-02-07 16:20:18 +0100
committerHans Bolinder <[email protected]>2018-02-07 16:20:18 +0100
commitcd9b6371a13c37f8f82586fcd82f212d306d8fad (patch)
treee5108365606b25ccff0d977a9c82783af6e4aef7 /lib/dialyzer/src
parent3003f6150317cee3e2c6859a82829e1b2ff4f12e (diff)
parente2848c09db25b356fdddc4f5f9dd4da6e6cfb6ec (diff)
downloadotp-cd9b6371a13c37f8f82586fcd82f212d306d8fad.tar.gz
otp-cd9b6371a13c37f8f82586fcd82f212d306d8fad.tar.bz2
otp-cd9b6371a13c37f8f82586fcd82f212d306d8fad.zip
Merge branch 'hasse/no_get_stacktrace/OTP-14861'
* hasse/no_get_stacktrace/OTP-14861: erts: Update abstract format doc with stacktrace variable wx: Do not call erlang:get_stacktrace() tools: Do not call erlang:get_stacktrace() stdlib: Do not call erlang:get_stacktrace() sasl: Do not call erlang:get_stacktrace() runtime_tools: Do not call erlang:get_stacktrace() reltool: Do not call erlang:get_stacktrace() parsetools: Do not call erlang:get_stacktrace() observer: Do not call erlang:get_stacktrace() mnesia: Do not call erlang:get_stacktrace() (cont) mnesia: Do not call erlang:get_stacktrace() kernel: Do not call erlang:get_stacktrace() inets: Do not call erlang:get_stacktrace() eunit: Do not call erlang:get_stacktrace() et: Do not call erlang:get_stacktrace() dialyzer: Do not call erlang:get_stacktrace() debugger: Do not call erlang:get_stacktrace() debugger: Do not try to restore stacktrace common_test: Do not call erlang:get_stacktrace()
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r--lib/dialyzer/src/dialyzer_cl_parse.erl4
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl5
-rw-r--r--lib/dialyzer/src/typer.erl4
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl
index 80c10183cf..f21eaed087 100644
--- a/lib/dialyzer/src/dialyzer_cl_parse.erl
+++ b/lib/dialyzer/src/dialyzer_cl_parse.erl
@@ -41,8 +41,8 @@ start() ->
Ret
catch
throw:{dialyzer_cl_parse_error, Msg} -> {error, Msg};
- _:R ->
- Msg = io_lib:format("~tp\n~tp\n", [R, erlang:get_stacktrace()]),
+ _:R:S ->
+ Msg = io_lib:format("~tp\n~tp\n", [R, S]),
{error, lists:flatten(Msg)}
end.
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index 6776f87b66..dede475f98 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -1900,9 +1900,8 @@ solver(Solver, SolveFun) ->
?debug("Solver ~w returned unexpected result:\n ~P\n",
[Solver, _R, 60]),
throw(error)
- catch E:R ->
- io:format("Solver ~w failed: ~w:~p\n ~tp\n",
- [Solver, E, R, erlang:get_stacktrace()]),
+ catch E:R:S ->
+ io:format("Solver ~w failed: ~w:~p\n ~tp\n", [Solver, E, R, S]),
throw(error)
end.
diff --git a/lib/dialyzer/src/typer.erl b/lib/dialyzer/src/typer.erl
index 16b9c8a94a..9d3d9ce438 100644
--- a/lib/dialyzer/src/typer.erl
+++ b/lib/dialyzer/src/typer.erl
@@ -164,9 +164,9 @@ get_type_info(#analysis{callgraph = CallGraph,
CodeServer),
Analysis#analysis{callgraph = StrippedCallGraph, trust_plt = NewPlt}
catch
- error:What ->
+ error:What:Stacktrace ->
fatal_error(io_lib:format("Analysis failed with message: ~tp",
- [{What, erlang:get_stacktrace()}]));
+ [{What, Stacktrace}]));
throw:{dialyzer_succ_typing_error, Msg} ->
fatal_error(io_lib:format("Analysis failed with message: ~ts", [Msg]))
end.