تخطَّ إلى المحتوى

Catch Of Control Flow Exception (ARCH6168)

هذا المحتوى غير متوفر بلغتك بعد.

Key ruby.logging.catch-signal-exception · Severity warning · Category logging

Catching runtime exceptions that should propagate, such as Interrupt or SignalException, breaks cancellation and graceful shutdown. The process becomes impossible to terminate.

def run
loop { work }
rescue Exception => e
Rails.logger.error("Error", exception: e)
retry
end
def run
loop { work }
rescue StandardError => e
Rails.logger.error("Error", exception: e)
retry
end

Rescue StandardError instead of Exception; let control-flow exceptions like Interrupt/SignalException propagate.