aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2017-05-10 14:20:13 +0200
committerJosé Valim <[email protected]>2017-05-15 16:27:39 +0200
commit7ff352ef8a5393a017ce493ba1a1fc3be54be245 (patch)
tree4623c2cbe6a4f25b9983f011a30be621bcc8fa5c /erts
parent8baada6ba97f7809c99cae4e799fddb273a54882 (diff)
downloadotp-7ff352ef8a5393a017ce493ba1a1fc3be54be245.tar.gz
otp-7ff352ef8a5393a017ce493ba1a1fc3be54be245.tar.bz2
otp-7ff352ef8a5393a017ce493ba1a1fc3be54be245.zip
Do not discard stacktraces on gen_server exits
Prior to this patch, the stacktrace of an error or exit in a callback would always be discarded in crash reports. For example, an exit(crashed) in handle_call/3 would emit: =CRASH REPORT==== 10-May-2017::14:15:50 === crasher: initial call: gen_server_SUITE:init/1 pid: <0.201.0> registered_name: [] exception exit: crashed in function gen_server:terminate/8 (src/gen_server.erl, line 828) Note that the stacktrace is pointing to the gen_server internal terminate implementation that calls exit/1. This patch uses erlang:raise/3 so the stacktrace is not lost, allowing proc_lib to show the class, reason and stacktrace coming from the user implementation (in this case gen_server_SUITE): =CRASH REPORT==== 10-May-2017::14:16:44 === crasher: initial call: gen_server_SUITE:init/1 pid: <0.197.0> registered_name: [] exception exit: crashed in function gen_server_SUITE:handle_call/3 (gen_server_SUITE.erl, line 1529) This change is completely backwards compatible as using erlang:raise/3 will still emit the same exit reason to any linked process and monitor as before.
Diffstat (limited to 'erts')
0 files changed, 0 insertions, 0 deletions