Exception: Mojang::Errors::MojangError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, msg) ⇒ MojangError

Returns a new instance of MojangError.



19
20
21
22
# File 'lib/errors.rb', line 19

def initialize(error, msg)
  @error = error
  @msg = msg
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



16
17
18
# File 'lib/errors.rb', line 16

def error
  @error
end

#msgObject (readonly)

Returns the value of attribute msg.



17
18
19
# File 'lib/errors.rb', line 17

def msg
  @msg
end

Instance Method Details

#messageObject



24
25
26
# File 'lib/errors.rb', line 24

def message
  "#{@msg} (#{@error})"
end