Exception: Teamspeak::ServerError
- Inherits:
-
StandardError
- Object
- StandardError
- Teamspeak::ServerError
- 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
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ ServerError
constructor
A new instance of ServerError.
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, ) @code = code @message = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/teamspeak-ruby/exceptions.rb', line 13 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
13 14 15 |
# File 'lib/teamspeak-ruby/exceptions.rb', line 13 def @message end |