solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Add section for exception handling

Open chiraggshah opened this issue 1 year ago • 5 comments

@rosa : I have added the documentation as discussed in #120. Let me know your feedback.

chiraggshah avatar Jan 29 '24 16:01 chiraggshah

Why not use rescue_from instead? As stated in the Active Job guide

brunoprietog avatar Jan 29 '24 17:01 brunoprietog

@brunoprietog : Thanks for the input. I have updated the PR.

chiraggshah avatar Feb 06 '24 20:02 chiraggshah

Nice! Now it looks much cleaner

brunoprietog avatar Feb 06 '24 22:02 brunoprietog

Also... I need to look a bit deeper into this, but I'm not sure using around_perform as it was used before, and rescue_from is fully equivalent. In the first case, we're scoping the block where an exception is captured to the perform method, and in the second case, we can rescue any exception even if it happens outside perform 🤔 I'm not sure if this makes a difference, I'd need to dig deeper into it, it's just that it's not completely obvious to me that these are equivalent.

rosa avatar Feb 13 '24 09:02 rosa

@rosa : Good point. I too will have a look.

chiraggshah avatar Feb 14 '24 07:02 chiraggshah