Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.3.5
* Make logs more specific about the reason when linking elements fails [#1167](https://github.com/membraneframework/membrane_core/pull/1167)

## 1.3.0
* Make errors more descriptive [#1102](https://github.com/membraneframework/membrane_core/pull/1102)
* Add `:broadcast` action for sending data to all output pads of an element
Expand Down
15 changes: 15 additions & 0 deletions lib/membrane/core/parent/child_life_controller/link_utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,21 @@ defmodule Membrane.Core.Parent.ChildLifeController.LinkUtils do
state
end

defp log_handle_link_error({:call_failure, {:timeout, _reason}}, from, to) do
Membrane.Logger.warning("""
Failed to establish link between #{inspect(from.child)} via #{inspect(from.pad_ref)} and
#{inspect(to.child)} via #{inspect(to.pad_ref)} because #{inspect(from.child)} took too long to link.
""")
end

defp log_handle_link_error({:call_failure, {{exception, _stack}, _reason}}, from, to)
when is_exception(exception) do
Membrane.Logger.debug("""
Failed to establish link between #{inspect(from.child)} via #{inspect(from.pad_ref)} and
#{inspect(to.child)} via #{inspect(to.pad_ref)} because #{inspect(from.child)} failed with an exception.
""")
end

defp log_handle_link_error({:call_failure, _reason}, from, to) do
Membrane.Logger.debug("""
Failed to establish link between #{inspect(from.child)} via #{inspect(from.pad_ref)} and
Expand Down
Loading