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
Unlike Deferreds, Effects can't have callbacks added to them after a result is available. This means that they have a handy property that once an effect has been performed, and it resulted in an error, we can know that that error won't be handled by any other code, and log it to stderr.
in which case having a default logger seems like a pretty reasonable solution. But if you're using effect.twisted.perform, since it provides the result in a way other than callbacks to the effects (by returning it as a deferred), there is still a chance to add error-handling errbacks.
So how about this: effect.perform() could default to logging errors, since it's otherwise impossible for callers to report unhandled errors. effect.twisted.perform and effect.sync_perform should not have this behavior, and just have the same behavior they have now.
The text was updated successfully, but these errors were encountered:
Unlike Deferreds, Effects can't have callbacks added to them after a result is available. This means that they have a handy property that once an effect has been performed, and it resulted in an error, we can know that that error won't be handled by any other code, and log it to stderr.
ideally the top-level of your program is:
in which case having a default logger seems like a pretty reasonable solution. But if you're using effect.twisted.perform, since it provides the result in a way other than callbacks to the effects (by returning it as a deferred), there is still a chance to add error-handling errbacks.
So how about this: effect.perform() could default to logging errors, since it's otherwise impossible for callers to report unhandled errors. effect.twisted.perform and effect.sync_perform should not have this behavior, and just have the same behavior they have now.
The text was updated successfully, but these errors were encountered: