mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 15:00:46 +00:00
log kind error in entry method
This commit is contained in:
parent
a0c722e722
commit
f3b8e97d5a
@ -42,6 +42,8 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
module Remote
|
module Remote
|
||||||
|
extend Logging
|
||||||
|
|
||||||
class Remote < Base
|
class Remote < Base
|
||||||
# Concrete class for Remote types
|
# Concrete class for Remote types
|
||||||
include Builder
|
include Builder
|
||||||
@ -70,9 +72,8 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class RemoteBasic < Remote
|
class RemoteBasic < Remote; end
|
||||||
# Concrete class for RemoteBasic types
|
# Concrete class for RemoteBasic types
|
||||||
end
|
|
||||||
|
|
||||||
class RemoteBanana < Remote
|
class RemoteBanana < Remote
|
||||||
# Concrete class for RemoteBanana types
|
# Concrete class for RemoteBanana types
|
||||||
@ -111,7 +112,8 @@ module Voicemeeter
|
|||||||
def self.new(kind_id, **)
|
def self.new(kind_id, **)
|
||||||
# Interface entry point. Wraps factory class and handles kind errors.
|
# Interface entry point. Wraps factory class and handles kind errors.
|
||||||
kind = Kinds.get(kind_id)
|
kind = Kinds.get(kind_id)
|
||||||
rescue KeyError
|
rescue KeyError => e
|
||||||
|
logger.error "#{e.class.name}: #{e.message}"
|
||||||
raise Errors::VMError.new "unknown Voicemeeter kind #{kind_id}"
|
raise Errors::VMError.new "unknown Voicemeeter kind #{kind_id}"
|
||||||
else
|
else
|
||||||
RequestRemote.for(kind, **)
|
RequestRemote.for(kind, **)
|
||||||
|
Loading…
Reference in New Issue
Block a user