Catch Of Control Flow Exception (ARCH6168)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
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.
Incorrect
Section titled “Incorrect”def run loop { work }rescue Exception => e Rails.logger.error("Error", exception: e) retryendCorrect
Section titled “Correct”def run loop { work }rescue StandardError => e Rails.logger.error("Error", exception: e) retryendRescue StandardError instead of Exception; let control-flow exceptions like Interrupt/SignalException propagate.