diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-10 01:51:06 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-10 01:51:06 +0900 |
| commit | f8b3db3f6641f79cf1bf1bbb9aa28d6922afe422 (patch) | |
| tree | 1c6319be6761f2e7ab44aa4baf5cb16bf8e95353 /internal/pipewire | |
| parent | 0e2fb1788f48540fd7a860b8c571e3a8c1cae756 (diff) | |
internal/pipewire: cleaner error message for unsupported type
The error string itself is descriptive enough, so use it as the error message directly.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire')
| -rw-r--r-- | internal/pipewire/core.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/pipewire/core.go b/internal/pipewire/core.go index eec62da3..d2677818 100644 --- a/internal/pipewire/core.go +++ b/internal/pipewire/core.go @@ -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]. 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]. type Core struct { |
