Skip to content

Commit

Permalink
erl_stdlib_errors: Fix wonky error description for maps:update/3
Browse files Browse the repository at this point in the history
  • Loading branch information
jhogberg committed Aug 14, 2024
1 parent fc482f0 commit 463a0b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/stdlib/src/erl_stdlib_errors.erl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ format_maps_error(take, _Args) ->
[[], not_map];
format_maps_error(to_list, _Args) ->
[not_map_or_iterator];
format_maps_error(update, [Key, _Value, Map]) when is_map(Map) ->
false = is_map_key(Key, Map), %Assertion.
[<<"not present in map">>, [], []];
format_maps_error(update, _Args) ->
[[], [], not_map];
format_maps_error(update_with, [_Key, Fun, Map]) ->
Expand Down

0 comments on commit 463a0b7

Please sign in to comment.