class Byebug::InfoCommand::CatchSubcommand


Information on exceptions that can be caught by the debugger

def description

def description
  <<-EOD
    inf[o] c[atch]
    #{short_description}
  EOD
end

def execute

def execute
  return puts('No frame selected.') unless @state.context
  if Byebug.catchpoints && !Byebug.catchpoints.empty?
    Byebug.catchpoints.each do |exception, _hits|
      puts("#{exception}: #{exception.is_a?(Class)}")
    end
  else
    puts 'No exceptions set to be caught.'
  end
end

def regexp

def regexp
  /^\s* c(?:atch)? (?:\s+ (.+))? \s*$/x
end

def short_description

def short_description
  'Exceptions that can be caught in the current stack frame'
end