Exception: OBSWS::OBSWSRequestError

Inherits:
OBSWSError
  • Object
show all
Defined in:
lib/obsws.rb

Overview

Raised when a request returns an error code

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req_name, code, comment) ⇒ OBSWSRequestError

Returns a new instance of OBSWSRequestError.



31
32
33
34
35
36
37
# File 'lib/obsws.rb', line 31

def initialize(req_name, code, comment)
  @req_name = req_name
  @code = code
  message = "Request #{@req_name} returned code #{@code}."
  message << " With message: #{comment}" if comment
  super(message)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



29
30
31
# File 'lib/obsws.rb', line 29

def code
  @code
end

#req_nameObject (readonly)

Returns the value of attribute req_name.



29
30
31
# File 'lib/obsws.rb', line 29

def req_name
  @req_name
end