aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-09-08 10:05:41 +0200
committerGitHub <[email protected]>2017-09-08 10:05:41 +0200
commita8e085c0aafcb52b9eed11b0a81fd69ac7801689 (patch)
treeac6886cc19e145ba9b878d3850df43e682e55ab6 /lib/stdlib/test
parent819839feb89fd7510440a242c08e5d3210ad4832 (diff)
parentc00141b1e368bc41d9628fddbc01a6553ca14479 (diff)
downloadotp-a8e085c0aafcb52b9eed11b0a81fd69ac7801689.tar.gz
otp-a8e085c0aafcb52b9eed11b0a81fd69ac7801689.tar.bz2
otp-a8e085c0aafcb52b9eed11b0a81fd69ac7801689.zip
Merge pull request #1561 from bjorng/bjorn/stdlib/false-warning/ERL-478/OTP-14600
Eliminate incorrect get_stacktrace/0 warning
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index cb1cceb8db..b76bece07f 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -4104,7 +4104,27 @@ get_stacktrace(Config) ->
[],
{warnings,[{4,erl_lint,{get_stacktrace,wrong_part_of_try}},
{13,erl_lint,{get_stacktrace,after_try}},
- {22,erl_lint,{get_stacktrace,after_try}}]}}],
+ {22,erl_lint,{get_stacktrace,after_try}}]}},
+ {multiple_catch_clauses,
+ <<"maybe_error(Arg) ->
+ try 5 / Arg
+ catch
+ error:badarith ->
+ _Stacktrace = erlang:get_stacktrace(),
+ try io:nl()
+ catch
+ error:_ -> io:format('internal error')
+ end;
+ error:badarg ->
+ _Stacktrace = erlang:get_stacktrace(),
+ try io:format(qwe)
+ catch
+ error:_ -> io:format('internal error')
+ end
+ end.
+ ">>,
+ [],
+ []}],
run(Config, Ts),
ok.