class LanguageServer::Protocol::Interface::ResponseError
Attributes
attributes[R]
Public Class Methods
new(code:, message:, data: nil)
click to toggle source
# File lib/language_server/protocol/interface/response_error.rb, line 5 def initialize(code:, message:, data: nil) @attributes = {} @attributes[:code] = code @attributes[:message] = message @attributes[:data] = data if data @attributes.freeze end
Public Instance Methods
code()
click to toggle source
A number indicating the error type that occurred.
@return [number]
# File lib/language_server/protocol/interface/response_error.rb, line 19 def code attributes.fetch(:code) end
data()
click to toggle source
A primitive or structured value that contains additional information about the error. Can be omitted.
@return [any]
# File lib/language_server/protocol/interface/response_error.rb, line 36 def data attributes.fetch(:data) end
message()
click to toggle source
A string providing a short description of the error.
@return [string]
# File lib/language_server/protocol/interface/response_error.rb, line 27 def message attributes.fetch(:message) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/response_error.rb, line 42 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/response_error.rb, line 46 def to_json(*args) to_hash.to_json(*args) end