You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But ideal solution is using throw instead of raise. It would stop execution (like raise does) and wouldn't require additional rescues. I can make a PR if you find this solution is acceptable.
The text was updated successfully, but these errors were encountered:
Version 4.0 will use throw and catch rather than raise and rescue for this very reason. My attention is turning to development of 4.0, but I would be happy to merge a readme update with a brief mention of context.fail!'s internal behavior and a warning that using a blanket rescue in your interactor may swallow the failure.
Currently
context.fail!
raises an error but there is no mention about that in Readme. Therefore a user could accidentally rescue these errors. Example:Here user tries to log unforeseen errors but instead finds such lines:
From my point of view, we should at least add information about that in README with possible solution:
But ideal solution is using
throw
instead ofraise
. It would stop execution (likeraise
does) and wouldn't require additionalrescues
. I can make a PR if you find this solution is acceptable.The text was updated successfully, but these errors were encountered: