voicemeeter-rb/lib/voicemeeter/errors.rb
onyx-and-iris 802bfdbc24 add to_cname to call
fn_name now passed in cname form to VMCAPIError
2023-07-25 12:58:17 +01:00

23 lines
372 B
Ruby

require_relative "util"
module Voicemeeter
module Errors
class VMError < StandardError
end
class VMCAPIError < VMError
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