lib/ruby-debug/processor.rb in ruby-debug-ide-0.2.1 vs lib/ruby-debug/processor.rb in ruby-debug-ide-0.3.0
- old
+ new
@@ -20,18 +20,21 @@
ctrl_cmds = ctrl_cmd_classes.map{|cmd| cmd.new(state, @printer)}
while input = @interface.read_command
# escape % since print_debug might use printf
@printer.print_debug "Processing: #{input.gsub('%', '%%')}"
+ # sleep 0.3
catch(:debug_error) do
if cmd = ctrl_cmds.find{|c| c.match(input) }
cmd.execute
else
process_context_commands(input)
end
end
end
rescue IOError, Errno::EPIPE
+ @printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
+ @printer.print_error $!.backtrace.map{|l| "\t#{l}"}.join("\n") rescue nil
rescue Exception
@printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
@printer.print_error $!.backtrace.map{|l| "\t#{l}"}.join("\n") rescue nil
ensure
@interface.close