Skip to content

Commit 31617dd

Browse files
committed
Document Map.fetch!/2 exception in the doc test
Also mirrors `Map.fetch/2` and thought it was nice to have there for easy & quick overview purposes.
1 parent fb9a9e9 commit 31617dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/elixir/lib/map.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ defmodule Map do
316316
317317
iex> Map.fetch!(%{a: 1}, :a)
318318
1
319+
iex> Map.fetch!(%{a: 1}, :b)
320+
** (KeyError) key :b not found in:
321+
...
319322
320323
"""
321324
@spec fetch!(map, key) :: value

0 commit comments

Comments
 (0)