Module: Debugger::InfoFunctions

Defined in:
lib/ruby-debug/commands/info.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#info_catch(*args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/ruby-debug/commands/info.rb', line 3

def info_catch(*args)
  unless @state.context
    print "No frame selected.\n"
    return 
  end
  if Debugger.catchpoints and not Debugger.catchpoints.empty?
    # FIXME: show whether Exception is valid or not
    # print "Exception: is_a?(Class)\n"
    Debugger.catchpoints.each do |exception, hits|
      # print "#{exception}: #{exception.is_a?(Class)}\n"
       print "#{exception}\n"
    end
  else
    print "No exceptions set to be caught.\n"
  end
end