internal/pipewire: cleaner error message for unsupported type
All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m55s
Test / Sandbox (race detector) (push) Successful in 5m10s
Test / Hpkg (push) Successful in 5m24s
Test / Hakurei (race detector) (push) Successful in 6m53s
Test / Hakurei (push) Successful in 7m30s
Test / Flake checks (push) Successful in 2m49s
All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m55s
Test / Sandbox (race detector) (push) Successful in 5m10s
Test / Hpkg (push) Successful in 5m24s
Test / Hakurei (race detector) (push) Successful in 6m53s
Test / Hakurei (push) Successful in 7m30s
Test / Flake checks (push) Successful in 2m49s
The error string itself is descriptive enough, so use it as the error message directly. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -644,7 +644,8 @@ func (registry *Registry) destroy(id Int) error {
|
|||||||
// An UnsupportedObjectTypeError is the name of a type not known by the server [Registry].
|
// An UnsupportedObjectTypeError is the name of a type not known by the server [Registry].
|
||||||
type UnsupportedObjectTypeError string
|
type UnsupportedObjectTypeError string
|
||||||
|
|
||||||
func (e UnsupportedObjectTypeError) Error() string { return "unsupported object type " + string(e) }
|
func (e UnsupportedObjectTypeError) Error() string { return "unsupported object type " + string(e) }
|
||||||
|
func (e UnsupportedObjectTypeError) Message() string { return e.Error() }
|
||||||
|
|
||||||
// Core holds state of [PW_TYPE_INTERFACE_Core].
|
// Core holds state of [PW_TYPE_INTERFACE_Core].
|
||||||
type Core struct {
|
type Core struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user