Exception: Discordrb::Errors::CodeError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Discordrb::Errors::CodeError
- Defined in:
- lib/discordrb/errors.rb
Overview
Generic class for errors denoted by API error codes
Class Attribute Summary collapse
-
.code ⇒ Integer
readonly
The error code represented by this error class.
Instance Attribute Summary collapse
-
#message ⇒ String
readonly
This error's represented message.
Instance Method Summary collapse
-
#code ⇒ Integer
The error code represented by this error.
-
#initialize(message) ⇒ CodeError
constructor
Create a new error with a particular message (the code should be defined by the class instance variable).
Constructor Details
#initialize(message) ⇒ CodeError
Create a new error with a particular message (the code should be defined by the class instance variable)
32 33 34 |
# File 'lib/discordrb/errors.rb', line 32 def initialize() @message = end |
Class Attribute Details
.code ⇒ Integer (readonly)
Returns The error code represented by this error class.
27 28 29 |
# File 'lib/discordrb/errors.rb', line 27 def code @code end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns This error's represented message.
42 43 44 |
# File 'lib/discordrb/errors.rb', line 42 def @message end |
Instance Method Details
#code ⇒ Integer
Returns The error code represented by this error.
37 38 39 |
# File 'lib/discordrb/errors.rb', line 37 def code self.class.code end |