Skip to content

Commit

Permalink
improve invalid child name error
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-hek committed Dec 8, 2022
1 parent 44bb9b6 commit e50ada5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/membrane/children_spec.ex
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ defmodule Membrane.ChildrenSpec do
do_child(child_name, child_definition, options)
end

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

@doc """
Expand Down
2 changes: 1 addition & 1 deletion lib/membrane/core/child/pad_model.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Membrane.Core.Child.PadModel do
ref: Membrane.Pad.ref_t(),
options: Membrane.ChildrenSpec.pad_options_t(),
link_id: Membrane.Core.Parent.Link.id(),
endpoint: Membrane.Core.Parent.Link.Endpoint.t(),
endpoint: Membrane.Core.Parent.Link.Endpoint.t() | nil,
linked?: boolean(),
response_received?: boolean(),
spec_ref: Membrane.Core.Parent.ChildLifeController.spec_ref_t(),
Expand Down

0 comments on commit e50ada5

Please sign in to comment.