lib/sugar/debug_sugar.rb in pry-moves-1.0.7 vs lib/sugar/debug_sugar.rb in pry-moves-1.0.8
- old
+ new
@@ -9,10 +9,10 @@
message = "😱 #{err}"
debug_object ||= err.metadata if err.respond_to? :metadata
unless PryMoves.open? or err.is_a? PryMoves::Restart
if PryMoves.stop_on_breakpoints
PryMoves.debug_error message.red, debug_object
- else
+ elsif !PryMoves.dont_print_errors
STDERR.puts PryMoves.format_debug_object(debug_object) if debug_object
STDERR.puts message.ljust(80, ' ').red
end
end
err = PryMoves::ErrorWithData.new(err, debug_object) unless err.is_a? Exception