Exception: Spoom::LSP::ResponseError

Inherits:
Error
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/spoom/sorbet/lsp/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, data) ⇒ ResponseError

Returns a new instance of ResponseError.



63
64
65
66
67
# File 'lib/spoom/sorbet/lsp/errors.rb', line 63

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



44
45
46
# File 'lib/spoom/sorbet/lsp/errors.rb', line 44

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



47
48
49
# File 'lib/spoom/sorbet/lsp/errors.rb', line 47

def data
  @data
end

Class Method Details

.from_json(json) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/spoom/sorbet/lsp/errors.rb', line 53

def from_json(json)
  ResponseError.new(
    json["code"],
    json["message"],
    json["data"],
  )
end