jondot / sneakers

A fast background processing framework for Ruby and RabbitMQ
https://github.com/jondot/sneakers
MIT License
2.25k stars 331 forks source link

Allow re-raise configured exceptions to worker #390

Closed Curter29 closed 5 years ago

Curter29 commented 5 years ago

If we need process some exceptions inside worker before

rescue StandardError, ScriptError => ex
michaelklishin commented 5 years ago

Please handle exceptions in your own code. Sneakers handles exceptions as a last resort. RabbitMQ consumers are generally expected to deal with their own exceptions.

@Tensho OK with you if I close this?

Tensho commented 5 years ago

@michaelklishin Sure, totally agree with your point.

anderslemke commented 5 years ago

@Curter29 I would like to understand why you would want to have any of StandardError or ScriptError bubble up to your app?

Also, raising exceptions at this point in the code, would make it ambiguous what happens to messages that are fetched from Rabbit. I would say, that they should be handled regardless of any exceptions.