class NotepadqqApi::MessageInterpreterError
Attributes
error_code[R]
error_string[R]
Public Class Methods
new(error_code, error_string)
click to toggle source
# File lib/notepadqq_api/message_interpreter.rb, line 132 def initialize(error_code, error_string) @error_code = error_code @error_string = error_string end
Public Instance Methods
description()
click to toggle source
# File lib/notepadqq_api/message_interpreter.rb, line 137 def description str_code = case @error_code when ErrorCode::NONE then "None" when ErrorCode::INVALID_REQUEST then "Invalid request" when ErrorCode::INVALID_ARGUMENT_NUMBER then "Invalid argument number" when ErrorCode::INVALID_ARGUMENT_TYPE then "Invalid argument type" when ErrorCode::OBJECT_DEALLOCATED then "Object deallocated" when ErrorCode::OBJECT_NOT_FOUND then "Object not found" when ErrorCode::METHOD_NOT_FOUND then "Method not found" else "Unknown error" end unless @error_string.nil? || @error_string.empty? str_code += ': ' + @error_string end str_code end