Skip to content

Commit ec0435b

Browse files
eksperimentaljosevalim
authored andcommitted
Change wording in error giving options (#7875)
1 parent 94348db commit ec0435b

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

lib/elixir/lib/gen_event.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ defmodule GenEvent do
182182

183183
other ->
184184
raise ArgumentError, """
185-
expected :name option to be one of:
185+
expected :name option to be one of the following:
186186
187187
* nil
188188
* atom

lib/elixir/lib/gen_server.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ defmodule GenServer do
843843

844844
{other, _} ->
845845
raise ArgumentError, """
846-
expected :name option to be one of:
846+
expected :name option to be one of the following:
847847
848848
* nil
849849
* atom

lib/elixir/lib/supervisor.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ defmodule Supervisor do
275275
with other developers and they can add it directly to their supervision tree
276276
without worrying about the low-level details of the worker.
277277
278-
Overall, the child specification can be one of:
278+
Overall, the child specification can be one of the following:
279279
280280
* a map representing the child specification itself - as outlined in the
281281
"Child specification" section
@@ -654,7 +654,7 @@ defmodule Supervisor do
654654

655655
defp init_child(other) do
656656
raise ArgumentError, """
657-
supervisors expect each child to be one of:
657+
supervisors expect each child to be one of the following:
658658
659659
* a module
660660
* a {module, arg} tuple
@@ -788,7 +788,7 @@ defmodule Supervisor do
788788

789789
other ->
790790
raise ArgumentError, """
791-
expected :name option to be one of:
791+
expected :name option to be one of the following:
792792
793793
* nil
794794
* atom

lib/elixir/test/elixir/gen_server_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ defmodule GenServerTest do
6363
end
6464

6565
test "start_link/3" do
66-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
66+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
6767
GenServer.start_link(Stack, [:hello], name: "my_gen_server_name")
6868
end
6969

70-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
70+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
7171
GenServer.start_link(Stack, [:hello], name: {:invalid_tuple, "my_gen_server_name"})
7272
end
7373

74-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
74+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
7575
GenServer.start_link(Stack, [:hello], name: {:via, "Via", "my_gen_server_name"})
7676
end
7777

lib/elixir/test/elixir/supervisor_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,17 @@ defmodule SupervisorTest do
166166
assert GenServer.call(:dyn_stack, :pop) == :hello
167167
Supervisor.stop(pid)
168168

169-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
169+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
170170
name = "my_gen_server_name"
171171
Supervisor.start_link(children, name: name, strategy: :one_for_one)
172172
end
173173

174-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
174+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
175175
name = {:invalid_tuple, "my_gen_server_name"}
176176
Supervisor.start_link(children, name: name, strategy: :one_for_one)
177177
end
178178

179-
assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
179+
assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
180180
name = {:via, "Via", "my_gen_server_name"}
181181
Supervisor.start_link(children, name: name, strategy: :one_for_one)
182182
end

0 commit comments

Comments
 (0)