Exception: NotepadqqApi::MessageInterpreterError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- NotepadqqApi::MessageInterpreterError
- Defined in:
- lib/notepadqq_api/message_interpreter.rb
Defined Under Namespace
Modules: ErrorCode
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(error_code) ⇒ MessageInterpreterError
constructor
A new instance of MessageInterpreterError.
Constructor Details
#initialize(error_code) ⇒ MessageInterpreterError
Returns a new instance of MessageInterpreterError.
131 132 133 |
# File 'lib/notepadqq_api/message_interpreter.rb', line 131 def initialize(error_code) @error_code = error_code end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
129 130 131 |
# File 'lib/notepadqq_api/message_interpreter.rb', line 129 def error_code @error_code end |
Instance Method Details
#description ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/notepadqq_api/message_interpreter.rb', line 135 def description 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 end |