diff options
author | José Valim <jose.valim@dashbit.co> | 2022-01-14 18:08:42 +0100 |
---|---|---|
committer | José Valim <jose.valim@dashbit.co> | 2022-02-08 12:28:14 +0100 |
commit | 1499ec5ad07906ab892424dfd93180834e2b4bd1 (patch) | |
tree | 978c3ad0dfcc553908e6cd92d29c9e631db2b688 /lib/debugger/src | |
parent | 493472016bde97de510bfedb8f6557bc371d0066 (diff) | |
download | erlang-1499ec5ad07906ab892424dfd93180834e2b4bd1.tar.gz |
Pass Anno to ExternalFunctionHandler in erl_eval
This allows code using `erl_eval` to provide better
stacktraces if desired. For this purpose, we also
make sure all errors raised from `erl_eval` pass
through the ExternalFunctionHandler.
Diffstat (limited to 'lib/debugger/src')
-rw-r--r-- | lib/debugger/src/dbg_ieval.erl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl index e03ca7fa11..18f226967d 100644 --- a/lib/debugger/src/dbg_ieval.erl +++ b/lib/debugger/src/dbg_ieval.erl @@ -1043,9 +1043,7 @@ expr({bin,Line,Fs}, Bs0, Ieval0) -> Ieval = Ieval0#ieval{line=Line,top=false}, try eval_bits:expr_grp(Fs, Bs0, - fun (E, B) -> expr(E, B, Ieval) end, - [], - false) + fun (E, B) -> expr(E, B, Ieval) end) catch Class:Reason -> exception(Class, Reason, Bs0, Ieval) @@ -1504,7 +1502,7 @@ guard_expr({bin,_,Flds}, Bs) -> fun(E,B) -> {value,V} = guard_expr(E,B), {value,V,B} - end, [], false), + end), {value,V}. @@ -1583,8 +1581,7 @@ match1({map,_,Fields}, Map, Bs, BBs) when is_map(Map) -> match1({bin,_,Fs}, B, Bs0, BBs) when is_bitstring(B) -> try eval_bits:match_bits(Fs, B, Bs0, BBs, match_fun(BBs), - fun(E, Bs) -> expr(E, Bs, #ieval{}) end, - false) + fun(E, Bs) -> expr(E, Bs, #ieval{}) end) catch _:_ -> throw(nomatch) end; |