mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
25 lines
518 B
Ruby
25 lines
518 B
Ruby
module Voicemeeter
|
|
module Errors
|
|
class VMError < StandardError; end
|
|
# Base Voicemeeter error class
|
|
|
|
class VMInstallError < VMError; end
|
|
# Errors raised during installation.
|
|
|
|
class VMCAPIError < VMError
|
|
# Errors raised when the C-API returns error codes
|
|
attr_reader :fn_name, :code
|
|
|
|
def initialize(fn_name, code)
|
|
@fn_name = fn_name
|
|
@code = code
|
|
super(message)
|
|
end
|
|
|
|
def message
|
|
"#{fn_name} returned #{code}"
|
|
end
|
|
end
|
|
end
|
|
end
|