Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

"exit 1" breaks ones code #10

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Please do not swallow exceptions, and do not exit without my consent.
I simpĺy changed the code to let the exception bubble up.

@zr40 zr40 commented on the diff Aug 26, 2012

lib/stalker.rb
@@ -88,10 +84,6 @@ def work_one_job
job.delete
log_job_end(name)
- rescue Beanstalk::NotConnected => e
- failed_connection(e)
- rescue SystemExit
- raise
@zr40

zr40 Aug 26, 2012

Don't delete this rescue SystemExit block. It prevents SystemExit from being handled and swallowed by the rescue block just below.

@zr40

zr40 Aug 26, 2012

Also don't delete the rescue Beanstalk::NotConnected block on line 91, for the same reason. Instead, replace failed_connection(e) with raise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment