[Chapel Merge] Change `map.getValue` to throw instead of halt and

Branch: refs/heads/main
Revision: d36d833
Author: bmcdonald3
Link: Change `map.getValue` to throw instead of halt and add a sentinel getValue overload by bmcdonald3 · Pull Request #18847 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18847 from bmcdonald3/get-value

Change map.getValue to throw instead of halt and add a sentinel getValue overload

[ reviewed by @e-kayrakli ]

Two users have requested the ability to have an overload of map.getValue() that will return a sentinel value in the case where the value is not found in the map. Through design discussion, we decided that we should instead throw rather than halt for getValue() and we should also have the sentinel overload, so this PR adds both of those methods.

  • [x] paratest

Closes New argument in map.getValue() · Issue #17498 · chapel-lang/chapel · GitHub
Closes https://github.com/cray/chapel-private/issues/2774
Design discussion: Adding an overload to `map.getValue()` to avoid halting · Issue #18786 · chapel-lang/chapel · GitHub

Modified Files:
A test/library/standard/Map/mapErrors.chpl

A test/library/standard/Map/mapErrors.good
M modules/standard/Map.chpl

Compare: https://github.com/chapel-lang/chapel/compare/b3bf940112ef...d36d83350246