Skip to content

Fix: rescue StandardError instead of Exception in PublishPostJob#61

Open
bellisabell wants to merge 1 commit intomainfrom
bell/fix-rescue-exception
Open

Fix: rescue StandardError instead of Exception in PublishPostJob#61
bellisabell wants to merge 1 commit intomainfrom
bell/fix-rescue-exception

Conversation

@bellisabell
Copy link
Copy Markdown
Contributor

Summary

Fixes a bug where rescue Exception was used instead of rescue StandardError in PublishPostJob.

Problem

Rescuing Exception catches critical errors that should not be caught:

  • SystemExit - prevents graceful shutdown
  • Interrupt (Ctrl+C) - prevents manual interruption
  • SignalException - blocks system signals
  • NoMemoryError, ScriptError, etc.

Solution

Changed to rescue StandardError => e, which catches application-level errors (network failures, timeouts, etc.) while allowing critical system errors to propagate.

Closes #24

Rescuing Exception catches SystemExit, Interrupt, SignalException, and other critical errors that should not be caught. StandardError is the correct base class for rescuing application-level errors. Closes #24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants