Class: Byebug::DAP::Command::ExceptionInfo
- Inherits:
-
Byebug::DAP::ContextualCommand
- Object
- Byebug::DAP::Command
- Byebug::DAP::ContextualCommand
- Byebug::DAP::Command::ExceptionInfo
- Defined in:
- lib/byebug/dap/commands/exception_info.rb
Constant Summary
Constants inherited from Byebug::DAP::Command
Instance Method Summary collapse
Methods inherited from Byebug::DAP::ContextualCommand
#execute, #forward_to_context, #initialize, resolve!
Methods inherited from Byebug::DAP::Command
command, execute, #execute_on_thread, #initialize, #log, register!, resolve!, #safe_execute, #started!, #stopped!
Methods included from SafeHelpers
Constructor Details
This class inherits a constructor from Byebug::DAP::ContextualCommand
Instance Method Details
#execute_in_context ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/byebug/dap/commands/exception_info.rb', line 7 def execute_in_context unless ex = @processor.last_exception respond! success: false, message: 'Not in a catchpoint context' return end class_name = safe(ex, [:class, :name]) { "Unknown" } respond! body: { exceptionId: class_name, description: exception_description(ex), breakMode: Protocol::ExceptionBreakMode::ALWAYS, details: details(ex, '$!'), } end |