diff --git a/internal/pipewire/client.go b/internal/pipewire/client.go index faa114b..662a24a 100644 --- a/internal/pipewire/client.go +++ b/internal/pipewire/client.go @@ -113,7 +113,7 @@ func (client *Client) consume(opcode byte, files []int, unmarshal func(v any)) e return nil default: - return &UnsupportedOpcodeError{opcode, client.String()} + panic(&UnsupportedOpcodeError{opcode, client.String()}) } } diff --git a/internal/pipewire/core.go b/internal/pipewire/core.go index d115da3..f6199c4 100644 --- a/internal/pipewire/core.go +++ b/internal/pipewire/core.go @@ -764,7 +764,7 @@ func (core *Core) consume(opcode byte, files []int, unmarshal func(v any)) error return proxy.setBoundProps(&boundProps) default: - return &UnsupportedOpcodeError{opcode, core.String()} + panic(&UnsupportedOpcodeError{opcode, core.String()}) } } @@ -831,7 +831,7 @@ func (registry *Registry) consume(opcode byte, files []int, unmarshal func(v any return nil default: - return &UnsupportedOpcodeError{opcode, registry.String()} + panic(&UnsupportedOpcodeError{opcode, registry.String()}) } } diff --git a/internal/pipewire/securitycontext.go b/internal/pipewire/securitycontext.go index c50665b..dbc3c52 100644 --- a/internal/pipewire/securitycontext.go +++ b/internal/pipewire/securitycontext.go @@ -190,7 +190,7 @@ func (securityContext *SecurityContext) consume(opcode byte, files []int, _ func // SecurityContext does not receive any events default: - return &UnsupportedOpcodeError{opcode, securityContext.String()} + panic(&UnsupportedOpcodeError{opcode, securityContext.String()}) } }