diff options
author | Björn Gustavsson <[email protected]> | 2011-03-24 11:23:58 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-08-16 08:58:48 +0200 |
commit | bbb379003d071f19595bb36d3ead79ba0c8474d3 (patch) | |
tree | 48e48f95b0b6faa2e7d7fde8adcf6c03d622a31f /lib/debugger/src/dbg_ieval.erl | |
parent | f2e0e976382eddd3d120110c87882a2185e868aa (diff) | |
download | otp-bbb379003d071f19595bb36d3ead79ba0c8474d3.tar.gz otp-bbb379003d071f19595bb36d3ead79ba0c8474d3.tar.bz2 otp-bbb379003d071f19595bb36d3ead79ba0c8474d3.zip |
dbg_ieval: Properly handle exceptions when binary construction fails
An exception from eval_bits:expr_grp/5 (for constructing binaries)
was not caught and handled by exception/4; thus exit_info and
and stacktrace for the process was not set.
Diffstat (limited to 'lib/debugger/src/dbg_ieval.erl')
-rw-r--r-- | lib/debugger/src/dbg_ieval.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl index b0792b05f0..d4009cea4d 100644 --- a/lib/debugger/src/dbg_ieval.erl +++ b/lib/debugger/src/dbg_ieval.erl @@ -925,10 +925,15 @@ expr({send,Line,To0,Msg0}, Bs0, Ieval0) -> %% Binary expr({bin,Line,Fs}, Bs0, Ieval0) -> Ieval = Ieval0#ieval{line=Line}, - eval_bits:expr_grp(Fs, Bs0, - fun (E, B) -> expr(E, B, Ieval) end, - [], - false); + try + eval_bits:expr_grp(Fs, Bs0, + fun (E, B) -> expr(E, B, Ieval) end, + [], + false) + catch + Class:Reason -> + exception(Class, Reason, Bs0, Ieval) + end; %% List comprehension expr({lc,_Line,E,Qs}, Bs, Ieval) -> |