Sha256: a61d1e282f30f8cf02a554df270346cb5e7dc77ca697c78ee5338a863b35b1a9

Contents?: true

Size: 807 Bytes

Versions: 40

Compression:

Stored size: 807 Bytes

Contents

module Debugger
  class CatchCommand < Command # :nodoc:
    self.control = true

    def regexp
      /^\s*cat(?:ch)?(?:\s+(.+))?$/
    end

    def execute
      if excn = @match[1]
        if excn == 'off'
          Debugger.catchpoint = nil
          print "Clear catchpoint.\n"
        else
          Debugger.catchpoint = excn
          print "Set catchpoint %s.\n", excn
        end
      else
        if Debugger.catchpoint
          print "Catchpoint %s.\n", Debugger.catchpoint
        else
          print "No catchpoint.\n"
        end
      end
    end

    class << self
      def help_command
        'catch'
      end

      def help(cmd)
        %{
          cat[ch]\t\t\tshow catchpoint
          cat[ch] <an Exception>\tset catchpoint to an exception
        }
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ruby-debug-0.4.5-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7.5-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7.4-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7.3-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7.2-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7.1-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.7-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.6.2-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.6.1-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.6-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.5.2-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.5.1-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.5-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.4.4-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.4.3-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.4.2-mswin32 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.10.0 cli/ruby-debug/commands/catchpoint.rb
ruby-debug-0.5.1 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.6.1 lib/ruby-debug/commands/catchpoint.rb
ruby-debug-0.4.5 lib/ruby-debug/commands/catchpoint.rb