lib/sugar/debug_sugar.rb in pry-moves-1.0.6 vs lib/sugar/debug_sugar.rb in pry-moves-1.0.7
- old
+ new
@@ -6,10 +6,10 @@
def error(err = "Error", debug_object = nil)
pry_moves_stack_end = true
message = "😱 #{err}"
debug_object ||= err.metadata if err.respond_to? :metadata
- unless PryMoves.open?
+ unless PryMoves.open? or err.is_a? PryMoves::Restart
if PryMoves.stop_on_breakpoints
PryMoves.debug_error message.red, debug_object
else
STDERR.puts PryMoves.format_debug_object(debug_object) if debug_object
STDERR.puts message.ljust(80, ' ').red