Class: PuppetEditorServices::Handler::DebugAdapter
- Defined in:
- lib/puppet_editor_services/handler/debug_adapter.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#handle(json_rpc_message, context = {}) ⇒ Object
context.
-
#unhandled_exception(error, options) ⇒ Object
abstract
options source :request, :notification etc.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PuppetEditorServices::Handler::Base
Instance Method Details
#handle(json_rpc_message, context = {}) ⇒ Object
context
19 20 21 22 23 24 25 |
# File 'lib/puppet_editor_services/handler/debug_adapter.rb', line 19 def handle(, context = {}) unless .is_a?(PuppetEditorServices::Protocol::DebugAdapterMessages::Request) PuppetEditorServices.(:error, "Unknown JSON RPC message type #{.class}") return false end handle_request(, context) end |
#unhandled_exception(error, options) ⇒ Object
This method is abstract.
options
source :request, :notification etc.
message JSON Message that caused the error
error Actual ruby error
14 15 16 |
# File 'lib/puppet_editor_services/handler/debug_adapter.rb', line 14 def unhandled_exception(error, ) PuppetEditorServices.(:error, "Unhandled exception from #{[:source]}. JSON Message #{[:message]}: #{error.inspect}\n#{error.backtrace}") end |