diff options
author | Björn Gustavsson <[email protected]> | 2017-12-08 12:27:10 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-12-08 12:27:10 +0100 |
commit | a89f4e93052614cfb98c608f8c1bc093620ac1c9 (patch) | |
tree | 901278a224bda78dc9efa07344fb83b7536791d3 /lib/compiler/src/compile.erl | |
parent | d61fc50c7cc42628e68cacec33c54fb141fb25c4 (diff) | |
download | otp-a89f4e93052614cfb98c608f8c1bc093620ac1c9.tar.gz otp-a89f4e93052614cfb98c608f8c1bc093620ac1c9.tar.bz2 otp-a89f4e93052614cfb98c608f8c1bc093620ac1c9.zip |
Use the new syntax for retrieving stack traces
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r-- | lib/compiler/src/compile.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 327fecf0e6..f963d9a480 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -1530,15 +1530,14 @@ native_compile_1(Code, St) -> {error,St#compile{errors=St#compile.errors ++ Es}} end catch - Class:R -> - Stk = erlang:get_stacktrace(), + Class:R:Stack -> case IgnoreErrors of true -> Ws = [{St#compile.ifile, - [{none,?MODULE,{native_crash,R,Stk}}]}], + [{none,?MODULE,{native_crash,R,Stack}}]}], {ok,St#compile{warnings=St#compile.warnings ++ Ws}}; false -> - erlang:raise(Class, R, Stk) + erlang:raise(Class, R, Stack) end end. |