Exception: Lapis::Yggdrasil::AuthenticationError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Lapis::Yggdrasil::AuthenticationError
- Defined in:
- lib/lapis/yggdrasil/authentication_error.rb
Overview
Information about an error that occurred while interacting with an authentication server.
Instance Attribute Summary collapse
-
#code ⇒ Symbol
readonly
Key used to distinguish from other error types.
Instance Method Summary collapse
-
#initialize(code, message = nil) ⇒ AuthenticationError
constructor
Creates a new authentication error.
-
#to_s ⇒ String
Creates a string representation of the error.
Constructor Details
#initialize(code, message = nil) ⇒ AuthenticationError
Creates a new authentication error.
15 16 17 18 |
# File 'lib/lapis/yggdrasil/authentication_error.rb', line 15 def initialize(code, = nil) super() @code = code end |
Instance Attribute Details
#code ⇒ Symbol (readonly)
Key used to distinguish from other error types.
10 11 12 |
# File 'lib/lapis/yggdrasil/authentication_error.rb', line 10 def code @code end |
Instance Method Details
#to_s ⇒ String
Creates a string representation of the error.
22 23 24 |
# File 'lib/lapis/yggdrasil/authentication_error.rb', line 22 def to_s "#{code} - #{super}" end |