Exception: Teamspeak::ServerError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/teamspeak-ruby/exceptions.rb

Overview

Raised when the server returns an error code other than 0.

raise ServerError.new(1, ‘Some generic error message’)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ ServerError

Returns a new instance of ServerError.



15
16
17
18
# File 'lib/teamspeak-ruby/exceptions.rb', line 15

def initialize(code, message)
  @code = code
  @message = message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



13
14
15
# File 'lib/teamspeak-ruby/exceptions.rb', line 13

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



13
14
15
# File 'lib/teamspeak-ruby/exceptions.rb', line 13

def message
  @message
end