Skip to content

Commit e50ada5

Browse files
committed
improve invalid child name error
1 parent 44bb9b6 commit e50ada5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/membrane/children_spec.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ defmodule Membrane.ChildrenSpec do
324324
do_child(child_name, child_definition, options)
325325
end
326326

327-
def child(_first_arg, _second_arg, _third_arg) do
328-
raise "Improper child name! Perhaps you meant to use get_child/2 while building your link?"
327+
def child(child_name, _second_arg, _third_arg) do
328+
raise "Invalid child name #{inspect(child_name)}. Child name can be an atom or a tuple."
329329
end
330330

331331
@doc """

lib/membrane/core/child/pad_model.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule Membrane.Core.Child.PadModel do
1212
ref: Membrane.Pad.ref_t(),
1313
options: Membrane.ChildrenSpec.pad_options_t(),
1414
link_id: Membrane.Core.Parent.Link.id(),
15-
endpoint: Membrane.Core.Parent.Link.Endpoint.t(),
15+
endpoint: Membrane.Core.Parent.Link.Endpoint.t() | nil,
1616
linked?: boolean(),
1717
response_received?: boolean(),
1818
spec_ref: Membrane.Core.Parent.ChildLifeController.spec_ref_t(),

0 commit comments

Comments
 (0)