Skip to content

Commit 220d78b

Browse files
committed
improved error handling
1 parent 9b597f8 commit 220d78b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/ruby-debug/processor.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ def process_commands
5757
end
5858
end
5959
end
60+
rescue IOError, Errno::EPIPE
61+
@printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
62+
@printer.print_error $!.backtrace.map{|l| "\t#{l}"}.join("\n") rescue nil
63+
rescue Exception
64+
@printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
65+
@printer.print_error $!.backtrace.map{|l| "\t#{l}"}.join("\n") rescue nil
6066
end
6167

6268
def splitter

0 commit comments

Comments
 (0)