Skip to content

Commit

Permalink
Merge branch 'john/stdlib/fix-maps-update-error-description/OTP-19189…
Browse files Browse the repository at this point in the history
…' into maint

* john/stdlib/fix-maps-update-error-description/OTP-19189:
  erl_stdlib_errors: Fix wonky error description for maps:update/3
  • Loading branch information
jhogberg committed Aug 26, 2024
2 parents b6fe0ae + 19970c8 commit e47c2a1
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 e47c2a1

Please sign in to comment.